﻿namespace Smarty
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Data;
    using SubSonic;
    using System.IO;
    using System.Web;
    using System.Web.UI;

    public class Language
    {
        Page page;
        public Language(Page page)
        {
            this.page = page;
        }

        public string Current
        {
            get
            {
                if (page.Session["language"] != null)
                {
                    return page.Session["language"].ToString();
                }
                else
                {
                    return "English";
                }
            }
        }
    }

    public class Factory
    {
        static public Builder CreateBuilder()
        {
            Builder builder = new Builder();
            DataProvider provider = DataService.Providers["MyProvider"];
                Table tablearticle = new Table();
                tablearticle.ShortName = "article";
                tablearticle.TableName = "article";
                            tablearticle.NumberOfChars = 80;
                tablearticle.DataSourceTable = "article";
                tablearticle.OwnerID = "";
                    Field article_ArtID = new Field();
                    article_ArtID.Name = "ArtID";
        	        article_ArtID.Label = "Art ID";
        	        
        	        

                                            article_ArtID.IsSearchable = true;

                                            article_ArtID.ShowOnListPage = true;

                    article_ArtID.LinkNewWindow = 0;
                    article_ArtID.LinkDisplay = 0;
                    article_ArtID.LinkParam = "";

        	        article_ArtID.FieldType = 200;
        	        article_ArtID.EditFormat = "Text field";
        	        article_ArtID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        article_ArtID.NeedEncode = true;

                    article_ArtID.ControlType = 0;

        	        article_ArtID.GoodName = "ArtID";
        	                	        article_ArtID.FullName = "ArtID";
        	        
        	                	        
        	        
        	        article_ArtID.Index = 1;
        	        
        	                	                	        article_ArtID.EditParams = "";
        	                	        article_ArtID.EditParams = article_ArtID.EditParams + " maxlength=40";
        	                	                		                	        article_ArtID.FieldPermissions = true;

        	        
                                        article_ArtID.Container = tablearticle;
        	        tablearticle.Fields.Add("ArtID", article_ArtID);
                    Field article_ArtCateID = new Field();
                    article_ArtCateID.Name = "ArtCateID";
        	        article_ArtCateID.Label = "Art Cate ID";
        	        
        	        

                                            article_ArtCateID.IsSearchable = true;

                                            article_ArtCateID.ShowOnListPage = true;

                    article_ArtCateID.LinkNewWindow = 0;
                    article_ArtCateID.LinkDisplay = 0;
                    article_ArtCateID.LinkParam = "";

        	        article_ArtCateID.FieldType = 200;
        	        article_ArtCateID.EditFormat = "Lookup wizard";
        	        article_ArtCateID.ViewFormat = "";
        	        
        	        
        	        
        	                	        article_ArtCateID.LookupType = 1;
        	                	        article_ArtCateID.LookupWhere = "";
        	        article_ArtCateID.LinkField = "`ArtCateID`";
        	                	        article_ArtCateID.DisplayField = "`CateName`";
        	        article_ArtCateID.LookupTable = "articlecategory";
        	                	                	                	        article_ArtCateID.NeedEncode = true;

                    article_ArtCateID.ControlType = 0;

        	        article_ArtCateID.GoodName = "ArtCateID";
        	                	        article_ArtCateID.FullName = "ArtCateID";
        	         article_ArtCateID.IsRequired = true;
        	                	        
        	        
        	        article_ArtCateID.Index = 2;
        	        
        	                	                	                		                	        article_ArtCateID.FieldPermissions = true;

        	        
                                            article_ArtCateID.AddNewItem =  false ;
                                                    article_ArtCateID.AdvancedAdd = true;
		                    article_ArtCateID.AddPage = "articlecategory_add.aspx";
                        article_ArtCateID.LinkField = "ArtCateID";
                        article_ArtCateID.DisplayField = "CateName";
                        article_ArtCateID.LookupTable = "articlecategory";
                        article_ArtCateID.StrSize = 1;
                        		                                                
                                                		
		                                        		     article_ArtCateID.OrderBy = "CateName";
		                                            article_ArtCateID.Container = tablearticle;
        	        tablearticle.Fields.Add("ArtCateID", article_ArtCateID);
                    Field article_Title = new Field();
                    article_Title.Name = "Title";
        	        
        	        
        	        

                                            article_Title.IsSearchable = true;

                                            article_Title.ShowOnListPage = true;

                    article_Title.LinkNewWindow = 0;
                    article_Title.LinkDisplay = 0;
                    article_Title.LinkParam = "";

        	        article_Title.FieldType = 200;
        	        article_Title.EditFormat = "Text field";
        	        article_Title.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        article_Title.NeedEncode = true;

                    article_Title.ControlType = 0;

        	        article_Title.GoodName = "Title";
        	                	        article_Title.FullName = "Title";
        	        
        	                	        
        	        
        	        article_Title.Index = 3;
        	        
        	                	                	        article_Title.EditParams = "";
        	                	        article_Title.EditParams = article_Title.EditParams + " maxlength=500";
        	                	                		                	        article_Title.FieldPermissions = true;

        	        
                                        article_Title.Container = tablearticle;
        	        tablearticle.Fields.Add("Title", article_Title);
                    Field article_ShortDescript = new Field();
                    article_ShortDescript.Name = "ShortDescript";
        	        article_ShortDescript.Label = "Short Descript";
        	        
        	        

                                            article_ShortDescript.IsSearchable = true;

                                            article_ShortDescript.ShowOnListPage = true;

                    article_ShortDescript.LinkNewWindow = 0;
                    article_ShortDescript.LinkDisplay = 0;
                    article_ShortDescript.LinkParam = "";

        	        article_ShortDescript.FieldType = 200;
        	        article_ShortDescript.EditFormat = "Text field";
        	        article_ShortDescript.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        article_ShortDescript.NeedEncode = true;

                    article_ShortDescript.ControlType = 0;

        	        article_ShortDescript.GoodName = "ShortDescript";
        	                	        article_ShortDescript.FullName = "ShortDescript";
        	        
        	                	        
        	        
        	        article_ShortDescript.Index = 4;
        	        
        	                	                	        article_ShortDescript.EditParams = "";
        	                	        article_ShortDescript.EditParams = article_ShortDescript.EditParams + " maxlength=1000";
        	                	                		                	        article_ShortDescript.FieldPermissions = true;

        	        
                                        article_ShortDescript.Container = tablearticle;
        	        tablearticle.Fields.Add("ShortDescript", article_ShortDescript);
                    Field article_Content = new Field();
                    article_Content.Name = "Content";
        	        
        	        
        	        

                                            article_Content.IsSearchable = true;

                                            article_Content.ShowOnListPage = true;

                    article_Content.LinkNewWindow = 0;
                    article_Content.LinkDisplay = 0;
                    article_Content.LinkParam = "";

        	        article_Content.FieldType = 201;
        	        article_Content.EditFormat = "Text area";
        	        article_Content.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        article_Content.NeedEncode = true;

                    article_Content.ControlType = 0;

        	        article_Content.GoodName = "Content";
        	                	        article_Content.FullName = "Content";
        	        
        	                	        
        	        
        	        article_Content.Index = 5;
        	        
        	                	        article_Content.EditParams = "";
        	                	        article_Content.EditParams = article_Content.EditParams + " rows=250";
        	        article_Content.NRows = 250;
        	                	        article_Content.EditParams = article_Content.EditParams + " cols=500";
        	        article_Content.NCols = 500;
        	                	                		                	        article_Content.FieldPermissions = true;

        	        
                                        article_Content.Container = tablearticle;
        	        tablearticle.Fields.Add("Content", article_Content);
                    Field article_Active = new Field();
                    article_Active.Name = "Active";
        	        
        	        
        	        

                                            article_Active.IsSearchable = true;

                                            article_Active.ShowOnListPage = true;

                    article_Active.LinkNewWindow = 0;
                    article_Active.LinkDisplay = 0;
                    article_Active.LinkParam = "";

        	        article_Active.FieldType = 13;
        	        article_Active.EditFormat = "Lookup wizard";
        	        article_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        article_Active.LookupType = 0;
        	                	                	                	        
                    article_Active.ControlType = 0;

        	        article_Active.GoodName = "Active";
        	                	        article_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        article_Active.Index = 6;
        	        
        	                	                	                		                	        article_Active.FieldPermissions = true;

        	        
                                            article_Active.AddNewItem =  false ;
                                                article_Active.LinkField = "";
                        article_Active.DisplayField = "";
                        article_Active.LookupTable = "";
                        article_Active.StrSize = 1;
                                                    int darticle_Active = 0;
		                    article_Active.Arr.Add(darticle_Active,"True");
		                    darticle_Active = darticle_Active + 1;
		                    article_Active.Arr.Add(darticle_Active,"False");
		                    darticle_Active = darticle_Active + 1;
                    article_Active.Container = tablearticle;
				        article_Active.LookupFields.Add(new LookupField("True", "True"));
				        article_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablearticle.Fields.Add("Active", article_Active);
                    Field article_Status = new Field();
                    article_Status.Name = "Status";
        	        
        	        
        	        

                                            article_Status.IsSearchable = true;

                                            article_Status.ShowOnListPage = true;

                    article_Status.LinkNewWindow = 0;
                    article_Status.LinkDisplay = 0;
                    article_Status.LinkParam = "";

        	        article_Status.FieldType = 3;
        	        article_Status.EditFormat = "Lookup wizard";
        	        article_Status.ViewFormat = "";
        	        
        	        
        	        
        	                	        article_Status.LookupType = 0;
        	                	                	                	                	        article_Status.NeedEncode = true;

                    article_Status.ControlType = 0;

        	        article_Status.GoodName = "Status";
        	                	        article_Status.FullName = "Status";
        	        
        	                	        
        	        
        	        article_Status.Index = 7;
        	        
        	                	                	                		                	        article_Status.FieldPermissions = true;

        	        
                                            article_Status.AddNewItem =  false ;
                                                article_Status.LinkField = "";
                        article_Status.DisplayField = "";
                        article_Status.LookupTable = "";
                        article_Status.StrSize = 1;
                                                    int darticle_Status = 0;
		                    article_Status.Arr.Add(darticle_Status,"0");
		                    darticle_Status = darticle_Status + 1;
		                    article_Status.Arr.Add(darticle_Status,"1");
		                    darticle_Status = darticle_Status + 1;
                    article_Status.Container = tablearticle;
				        article_Status.LookupFields.Add(new LookupField("0", "0"));
				        article_Status.LookupFields.Add(new LookupField("1", "1"));
        	        tablearticle.Fields.Add("Status", article_Status);
                    Field article_VipLevel = new Field();
                    article_VipLevel.Name = "VipLevel";
        	        article_VipLevel.Label = "Vip Level";
        	        
        	        

                                            article_VipLevel.IsSearchable = true;

                                            article_VipLevel.ShowOnListPage = true;

                    article_VipLevel.LinkNewWindow = 0;
                    article_VipLevel.LinkDisplay = 0;
                    article_VipLevel.LinkParam = "";

        	        article_VipLevel.FieldType = 3;
        	        article_VipLevel.EditFormat = "Lookup wizard";
        	        article_VipLevel.ViewFormat = "";
        	        
        	        
        	        
        	                	        article_VipLevel.LookupType = 0;
        	                	                	                	                	        article_VipLevel.NeedEncode = true;

                    article_VipLevel.ControlType = 0;

        	        article_VipLevel.GoodName = "VipLevel";
        	                	        article_VipLevel.FullName = "VipLevel";
        	        
        	                	        
        	        
        	        article_VipLevel.Index = 8;
        	        
        	                	                	                		                	        article_VipLevel.FieldPermissions = true;

        	        
                                            article_VipLevel.AddNewItem =  false ;
                                                article_VipLevel.LinkField = "";
                        article_VipLevel.DisplayField = "";
                        article_VipLevel.LookupTable = "";
                        article_VipLevel.StrSize = 1;
                                                    int darticle_VipLevel = 0;
		                    article_VipLevel.Arr.Add(darticle_VipLevel,"0");
		                    darticle_VipLevel = darticle_VipLevel + 1;
		                    article_VipLevel.Arr.Add(darticle_VipLevel,"1");
		                    darticle_VipLevel = darticle_VipLevel + 1;
		                    article_VipLevel.Arr.Add(darticle_VipLevel,"2");
		                    darticle_VipLevel = darticle_VipLevel + 1;
		                    article_VipLevel.Arr.Add(darticle_VipLevel,"3");
		                    darticle_VipLevel = darticle_VipLevel + 1;
		                    article_VipLevel.Arr.Add(darticle_VipLevel,"4");
		                    darticle_VipLevel = darticle_VipLevel + 1;
		                    article_VipLevel.Arr.Add(darticle_VipLevel,"5");
		                    darticle_VipLevel = darticle_VipLevel + 1;
                    article_VipLevel.Container = tablearticle;
				        article_VipLevel.LookupFields.Add(new LookupField("0", "0"));
				        article_VipLevel.LookupFields.Add(new LookupField("1", "1"));
				        article_VipLevel.LookupFields.Add(new LookupField("2", "2"));
				        article_VipLevel.LookupFields.Add(new LookupField("3", "3"));
				        article_VipLevel.LookupFields.Add(new LookupField("4", "4"));
				        article_VipLevel.LookupFields.Add(new LookupField("5", "5"));
        	        tablearticle.Fields.Add("VipLevel", article_VipLevel);
                    Field article_Viewed = new Field();
                    article_Viewed.Name = "Viewed";
        	        
        	        
        	        

                                            article_Viewed.IsSearchable = true;

                                            article_Viewed.ShowOnListPage = true;

                    article_Viewed.LinkNewWindow = 0;
                    article_Viewed.LinkDisplay = 0;
                    article_Viewed.LinkParam = "";

        	        article_Viewed.FieldType = 5;
        	        article_Viewed.EditFormat = "Text field";
        	        article_Viewed.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        article_Viewed.NeedEncode = true;

                    article_Viewed.ControlType = 0;

        	        article_Viewed.GoodName = "Viewed";
        	                	        article_Viewed.FullName = "Viewed";
        	        
        	                	        
        	        
        	        article_Viewed.Index = 9;
        	        
        	                	                	        article_Viewed.EditParams = "";
        	                	                	                		                	        article_Viewed.FieldPermissions = true;

        	        
                                        article_Viewed.Container = tablearticle;
        	        tablearticle.Fields.Add("Viewed", article_Viewed);
                    Field article_Image = new Field();
                    article_Image.Name = "Image";
        	        
        	        
        	        

                                            article_Image.IsSearchable = true;

                                            article_Image.ShowOnListPage = true;

                    article_Image.LinkNewWindow = 0;
                    article_Image.LinkDisplay = 0;
                    article_Image.LinkParam = "";

        	        article_Image.FieldType = 200;
        	        article_Image.EditFormat = "Text field";
        	        article_Image.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        article_Image.NeedEncode = true;

                    article_Image.ControlType = 0;

        	        article_Image.GoodName = "Image";
        	                	        article_Image.FullName = "Image";
        	        
        	                	        
        	        
        	        article_Image.Index = 10;
        	        
        	                	                	        article_Image.EditParams = "";
        	                	        article_Image.EditParams = article_Image.EditParams + " maxlength=1000";
        	                	                		                	        article_Image.FieldPermissions = true;

        	        
                                        article_Image.Container = tablearticle;
        	        tablearticle.Fields.Add("Image", article_Image);
                    Field article_Author = new Field();
                    article_Author.Name = "Author";
        	        
        	        
        	        

                                            article_Author.IsSearchable = true;

                                            article_Author.ShowOnListPage = true;

                    article_Author.LinkNewWindow = 0;
                    article_Author.LinkDisplay = 0;
                    article_Author.LinkParam = "";

        	        article_Author.FieldType = 200;
        	        article_Author.EditFormat = "Text field";
        	        article_Author.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        article_Author.NeedEncode = true;

                    article_Author.ControlType = 0;

        	        article_Author.GoodName = "Author";
        	                	        article_Author.FullName = "Author";
        	        
        	                	        
        	        
        	        article_Author.Index = 11;
        	        
        	                	                	        article_Author.EditParams = "";
        	                	        article_Author.EditParams = article_Author.EditParams + " maxlength=255";
        	                	                		                	        article_Author.FieldPermissions = true;

        	        
                                        article_Author.Container = tablearticle;
        	        tablearticle.Fields.Add("Author", article_Author);
                    Field article_Hot = new Field();
                    article_Hot.Name = "Hot";
        	        
        	        
        	        

                                            article_Hot.IsSearchable = true;

                                            article_Hot.ShowOnListPage = true;

                    article_Hot.LinkNewWindow = 0;
                    article_Hot.LinkDisplay = 0;
                    article_Hot.LinkParam = "";

        	        article_Hot.FieldType = 13;
        	        article_Hot.EditFormat = "Lookup wizard";
        	        article_Hot.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        article_Hot.LookupType = 0;
        	                	                	                	        
                    article_Hot.ControlType = 0;

        	        article_Hot.GoodName = "Hot";
        	                	        article_Hot.FullName = "Hot";
        	        
        	                	        
        	        
        	        article_Hot.Index = 12;
        	        
        	                	                	                		                	        article_Hot.FieldPermissions = true;

        	        
                                            article_Hot.AddNewItem =  false ;
                                                article_Hot.LinkField = "";
                        article_Hot.DisplayField = "";
                        article_Hot.LookupTable = "";
                        article_Hot.StrSize = 1;
                                                    int darticle_Hot = 0;
		                    article_Hot.Arr.Add(darticle_Hot,"True");
		                    darticle_Hot = darticle_Hot + 1;
		                    article_Hot.Arr.Add(darticle_Hot,"False");
		                    darticle_Hot = darticle_Hot + 1;
                    article_Hot.Container = tablearticle;
				        article_Hot.LookupFields.Add(new LookupField("True", "True"));
				        article_Hot.LookupFields.Add(new LookupField("False", "False"));
        	        tablearticle.Fields.Add("Hot", article_Hot);
                    Field article_CreatedDate = new Field();
                    article_CreatedDate.Name = "CreatedDate";
        	        article_CreatedDate.Label = "Created Date";
        	        
        	        

                                            article_CreatedDate.IsSearchable = true;

                                            article_CreatedDate.ShowOnListPage = true;

                    article_CreatedDate.LinkNewWindow = 0;
                    article_CreatedDate.LinkDisplay = 0;
                    article_CreatedDate.LinkParam = "";

        	        article_CreatedDate.FieldType = 135;
        	        article_CreatedDate.EditFormat = "Date";
        	        article_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        article_CreatedDate.NeedEncode = true;

                    article_CreatedDate.ControlType = 0;

        	        article_CreatedDate.GoodName = "CreatedDate";
        	                	        article_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        article_CreatedDate.Index = 13;
        	         article_CreatedDate.DateEditType = 13;
        	                	                	                		                	        article_CreatedDate.FieldPermissions = true;

        	        
                                        article_CreatedDate.Container = tablearticle;
        	        tablearticle.Fields.Add("CreatedDate", article_CreatedDate);
                    Field article_UpdatedDate = new Field();
                    article_UpdatedDate.Name = "UpdatedDate";
        	        article_UpdatedDate.Label = "Updated Date";
        	        
        	        

                                            article_UpdatedDate.IsSearchable = true;

                                            article_UpdatedDate.ShowOnListPage = true;

                    article_UpdatedDate.LinkNewWindow = 0;
                    article_UpdatedDate.LinkDisplay = 0;
                    article_UpdatedDate.LinkParam = "";

        	        article_UpdatedDate.FieldType = 135;
        	        article_UpdatedDate.EditFormat = "Date";
        	        article_UpdatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        article_UpdatedDate.NeedEncode = true;

                    article_UpdatedDate.ControlType = 0;

        	        article_UpdatedDate.GoodName = "UpdatedDate";
        	                	        article_UpdatedDate.FullName = "UpdatedDate";
        	        
        	                	        
        	        
        	        article_UpdatedDate.Index = 14;
        	         article_UpdatedDate.DateEditType = 13;
        	                	                	                		                	        article_UpdatedDate.FieldPermissions = true;

        	        
                                        article_UpdatedDate.Container = tablearticle;
        	        tablearticle.Fields.Add("UpdatedDate", article_UpdatedDate);
                builder.Tables.Add("article", tablearticle);
                builder.SubSonicTables.Add("article", tablearticle);
                Table tablearticlecategory = new Table();
                tablearticlecategory.ShortName = "articlecategory";
                tablearticlecategory.TableName = "articlecategory";
                            tablearticlecategory.NumberOfChars = 80;
                tablearticlecategory.DataSourceTable = "articlecategory";
                tablearticlecategory.OwnerID = "";
                    Field articlecategory_ArtCateID = new Field();
                    articlecategory_ArtCateID.Name = "ArtCateID";
        	        articlecategory_ArtCateID.Label = "Art Cate ID";
        	        
        	        

                                            articlecategory_ArtCateID.IsSearchable = true;

                                            articlecategory_ArtCateID.ShowOnListPage = true;

                    articlecategory_ArtCateID.LinkNewWindow = 0;
                    articlecategory_ArtCateID.LinkDisplay = 0;
                    articlecategory_ArtCateID.LinkParam = "";

        	        articlecategory_ArtCateID.FieldType = 200;
        	        articlecategory_ArtCateID.EditFormat = "Text field";
        	        articlecategory_ArtCateID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        articlecategory_ArtCateID.NeedEncode = true;

                    articlecategory_ArtCateID.ControlType = 0;

        	        articlecategory_ArtCateID.GoodName = "ArtCateID";
        	                	        articlecategory_ArtCateID.FullName = "ArtCateID";
        	        
        	                	        
        	        
        	        articlecategory_ArtCateID.Index = 1;
        	        
        	                	                	        articlecategory_ArtCateID.EditParams = "";
        	                	        articlecategory_ArtCateID.EditParams = articlecategory_ArtCateID.EditParams + " maxlength=40";
        	                	                		                	        articlecategory_ArtCateID.FieldPermissions = true;

        	        
                                        articlecategory_ArtCateID.Container = tablearticlecategory;
        	        tablearticlecategory.Fields.Add("ArtCateID", articlecategory_ArtCateID);
                    Field articlecategory_CateName = new Field();
                    articlecategory_CateName.Name = "CateName";
        	        articlecategory_CateName.Label = "Cate Name";
        	        
        	        

                                            articlecategory_CateName.IsSearchable = true;

                                            articlecategory_CateName.ShowOnListPage = true;

                    articlecategory_CateName.LinkNewWindow = 0;
                    articlecategory_CateName.LinkDisplay = 0;
                    articlecategory_CateName.LinkParam = "";

        	        articlecategory_CateName.FieldType = 200;
        	        articlecategory_CateName.EditFormat = "Text field";
        	        articlecategory_CateName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        articlecategory_CateName.NeedEncode = true;

                    articlecategory_CateName.ControlType = 0;

        	        articlecategory_CateName.GoodName = "CateName";
        	                	        articlecategory_CateName.FullName = "CateName";
        	        
        	                	        
        	        
        	        articlecategory_CateName.Index = 2;
        	        
        	                	                	        articlecategory_CateName.EditParams = "";
        	                	        articlecategory_CateName.EditParams = articlecategory_CateName.EditParams + " maxlength=255";
        	                	                		                	        articlecategory_CateName.FieldPermissions = true;

        	        
                                        articlecategory_CateName.Container = tablearticlecategory;
        	        tablearticlecategory.Fields.Add("CateName", articlecategory_CateName);
                    Field articlecategory_Description = new Field();
                    articlecategory_Description.Name = "Description";
        	        
        	        
        	        

                                            articlecategory_Description.IsSearchable = true;

                                            articlecategory_Description.ShowOnListPage = true;

                    articlecategory_Description.LinkNewWindow = 0;
                    articlecategory_Description.LinkDisplay = 0;
                    articlecategory_Description.LinkParam = "";

        	        articlecategory_Description.FieldType = 200;
        	        articlecategory_Description.EditFormat = "Text field";
        	        articlecategory_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        articlecategory_Description.NeedEncode = true;

                    articlecategory_Description.ControlType = 0;

        	        articlecategory_Description.GoodName = "Description";
        	                	        articlecategory_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        articlecategory_Description.Index = 3;
        	        
        	                	                	        articlecategory_Description.EditParams = "";
        	                	        articlecategory_Description.EditParams = articlecategory_Description.EditParams + " maxlength=500";
        	                	                		                	        articlecategory_Description.FieldPermissions = true;

        	        
                                        articlecategory_Description.Container = tablearticlecategory;
        	        tablearticlecategory.Fields.Add("Description", articlecategory_Description);
                    Field articlecategory_CateParent = new Field();
                    articlecategory_CateParent.Name = "CateParent";
        	        articlecategory_CateParent.Label = "Cate Parent";
        	        
        	        

                                            articlecategory_CateParent.IsSearchable = true;

                                            articlecategory_CateParent.ShowOnListPage = true;

                    articlecategory_CateParent.LinkNewWindow = 0;
                    articlecategory_CateParent.LinkDisplay = 0;
                    articlecategory_CateParent.LinkParam = "";

        	        articlecategory_CateParent.FieldType = 200;
        	        articlecategory_CateParent.EditFormat = "Lookup wizard";
        	        articlecategory_CateParent.ViewFormat = "";
        	        
        	        
        	        
        	                	        articlecategory_CateParent.LookupType = 1;
        	                	        articlecategory_CateParent.LookupWhere = "";
        	        articlecategory_CateParent.LinkField = "`ArtCateID`";
        	                	        articlecategory_CateParent.DisplayField = "`CateName`";
        	        articlecategory_CateParent.LookupTable = "articlecategory";
        	                	                	                	        articlecategory_CateParent.NeedEncode = true;

                    articlecategory_CateParent.ControlType = 0;

        	        articlecategory_CateParent.GoodName = "CateParent";
        	                	        articlecategory_CateParent.FullName = "CateParent";
        	        
        	                	        
        	        
        	        articlecategory_CateParent.Index = 4;
        	        
        	                	                	                		                	        articlecategory_CateParent.FieldPermissions = true;

        	        
                                            articlecategory_CateParent.AddNewItem =  false ;
                                                    articlecategory_CateParent.AdvancedAdd = true;
		                    articlecategory_CateParent.AddPage = "articlecategory_add.aspx";
                        articlecategory_CateParent.LinkField = "ArtCateID";
                        articlecategory_CateParent.DisplayField = "CateName";
                        articlecategory_CateParent.LookupTable = "articlecategory";
                        articlecategory_CateParent.StrSize = 1;
                        		                                                
                                                		
		                                        		     articlecategory_CateParent.OrderBy = "CateName";
		                                            articlecategory_CateParent.Container = tablearticlecategory;
        	        tablearticlecategory.Fields.Add("CateParent", articlecategory_CateParent);
                    Field articlecategory_VipLevel = new Field();
                    articlecategory_VipLevel.Name = "VipLevel";
        	        articlecategory_VipLevel.Label = "Vip Level";
        	        
        	        

                                            articlecategory_VipLevel.IsSearchable = true;

                                            articlecategory_VipLevel.ShowOnListPage = true;

                    articlecategory_VipLevel.LinkNewWindow = 0;
                    articlecategory_VipLevel.LinkDisplay = 0;
                    articlecategory_VipLevel.LinkParam = "";

        	        articlecategory_VipLevel.FieldType = 3;
        	        articlecategory_VipLevel.EditFormat = "Lookup wizard";
        	        articlecategory_VipLevel.ViewFormat = "";
        	        
        	        
        	        
        	                	        articlecategory_VipLevel.LookupType = 0;
        	                	                	                	                	        articlecategory_VipLevel.NeedEncode = true;

                    articlecategory_VipLevel.ControlType = 0;

        	        articlecategory_VipLevel.GoodName = "VipLevel";
        	                	        articlecategory_VipLevel.FullName = "VipLevel";
        	        
        	                	        
        	        
        	        articlecategory_VipLevel.Index = 5;
        	        
        	                	                	                		                	        articlecategory_VipLevel.FieldPermissions = true;

        	        
                                            articlecategory_VipLevel.AddNewItem =  false ;
                                                articlecategory_VipLevel.LinkField = "";
                        articlecategory_VipLevel.DisplayField = "";
                        articlecategory_VipLevel.LookupTable = "";
                        articlecategory_VipLevel.StrSize = 1;
                                                    int darticlecategory_VipLevel = 0;
		                    articlecategory_VipLevel.Arr.Add(darticlecategory_VipLevel,"0");
		                    darticlecategory_VipLevel = darticlecategory_VipLevel + 1;
		                    articlecategory_VipLevel.Arr.Add(darticlecategory_VipLevel,"1");
		                    darticlecategory_VipLevel = darticlecategory_VipLevel + 1;
		                    articlecategory_VipLevel.Arr.Add(darticlecategory_VipLevel,"2");
		                    darticlecategory_VipLevel = darticlecategory_VipLevel + 1;
		                    articlecategory_VipLevel.Arr.Add(darticlecategory_VipLevel,"3");
		                    darticlecategory_VipLevel = darticlecategory_VipLevel + 1;
		                    articlecategory_VipLevel.Arr.Add(darticlecategory_VipLevel,"4");
		                    darticlecategory_VipLevel = darticlecategory_VipLevel + 1;
		                    articlecategory_VipLevel.Arr.Add(darticlecategory_VipLevel,"5");
		                    darticlecategory_VipLevel = darticlecategory_VipLevel + 1;
                    articlecategory_VipLevel.Container = tablearticlecategory;
				        articlecategory_VipLevel.LookupFields.Add(new LookupField("0", "0"));
				        articlecategory_VipLevel.LookupFields.Add(new LookupField("1", "1"));
				        articlecategory_VipLevel.LookupFields.Add(new LookupField("2", "2"));
				        articlecategory_VipLevel.LookupFields.Add(new LookupField("3", "3"));
				        articlecategory_VipLevel.LookupFields.Add(new LookupField("4", "4"));
				        articlecategory_VipLevel.LookupFields.Add(new LookupField("5", "5"));
        	        tablearticlecategory.Fields.Add("VipLevel", articlecategory_VipLevel);
                    Field articlecategory_Active = new Field();
                    articlecategory_Active.Name = "Active";
        	        
        	        
        	        

                                            articlecategory_Active.IsSearchable = true;

                                            articlecategory_Active.ShowOnListPage = true;

                    articlecategory_Active.LinkNewWindow = 0;
                    articlecategory_Active.LinkDisplay = 0;
                    articlecategory_Active.LinkParam = "";

        	        articlecategory_Active.FieldType = 13;
        	        articlecategory_Active.EditFormat = "Lookup wizard";
        	        articlecategory_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        articlecategory_Active.LookupType = 0;
        	                	                	                	        
                    articlecategory_Active.ControlType = 0;

        	        articlecategory_Active.GoodName = "Active";
        	                	        articlecategory_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        articlecategory_Active.Index = 6;
        	        
        	                	                	                		                	        articlecategory_Active.FieldPermissions = true;

        	        
                                            articlecategory_Active.AddNewItem =  false ;
                                                articlecategory_Active.LinkField = "";
                        articlecategory_Active.DisplayField = "";
                        articlecategory_Active.LookupTable = "";
                        articlecategory_Active.StrSize = 1;
                                                    int darticlecategory_Active = 0;
		                    articlecategory_Active.Arr.Add(darticlecategory_Active,"True");
		                    darticlecategory_Active = darticlecategory_Active + 1;
		                    articlecategory_Active.Arr.Add(darticlecategory_Active,"False");
		                    darticlecategory_Active = darticlecategory_Active + 1;
                    articlecategory_Active.Container = tablearticlecategory;
				        articlecategory_Active.LookupFields.Add(new LookupField("True", "True"));
				        articlecategory_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablearticlecategory.Fields.Add("Active", articlecategory_Active);
                    Field articlecategory_CreatedDate = new Field();
                    articlecategory_CreatedDate.Name = "CreatedDate";
        	        articlecategory_CreatedDate.Label = "Created Date";
        	        
        	        

                                            articlecategory_CreatedDate.IsSearchable = true;

                                            articlecategory_CreatedDate.ShowOnListPage = true;

                    articlecategory_CreatedDate.LinkNewWindow = 0;
                    articlecategory_CreatedDate.LinkDisplay = 0;
                    articlecategory_CreatedDate.LinkParam = "";

        	        articlecategory_CreatedDate.FieldType = 135;
        	        articlecategory_CreatedDate.EditFormat = "Date";
        	        articlecategory_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        articlecategory_CreatedDate.NeedEncode = true;

                    articlecategory_CreatedDate.ControlType = 0;

        	        articlecategory_CreatedDate.GoodName = "CreatedDate";
        	                	        articlecategory_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        articlecategory_CreatedDate.Index = 7;
        	         articlecategory_CreatedDate.DateEditType = 13;
        	                	                	                		                	        articlecategory_CreatedDate.FieldPermissions = true;

        	        
                                        articlecategory_CreatedDate.Container = tablearticlecategory;
        	        tablearticlecategory.Fields.Add("CreatedDate", articlecategory_CreatedDate);
                    Field articlecategory_UpdatedDate = new Field();
                    articlecategory_UpdatedDate.Name = "UpdatedDate";
        	        articlecategory_UpdatedDate.Label = "Updated Date";
        	        
        	        

                                            articlecategory_UpdatedDate.IsSearchable = true;

                                            articlecategory_UpdatedDate.ShowOnListPage = true;

                    articlecategory_UpdatedDate.LinkNewWindow = 0;
                    articlecategory_UpdatedDate.LinkDisplay = 0;
                    articlecategory_UpdatedDate.LinkParam = "";

        	        articlecategory_UpdatedDate.FieldType = 135;
        	        articlecategory_UpdatedDate.EditFormat = "Date";
        	        articlecategory_UpdatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        articlecategory_UpdatedDate.NeedEncode = true;

                    articlecategory_UpdatedDate.ControlType = 0;

        	        articlecategory_UpdatedDate.GoodName = "UpdatedDate";
        	                	        articlecategory_UpdatedDate.FullName = "UpdatedDate";
        	        
        	                	        
        	        
        	        articlecategory_UpdatedDate.Index = 8;
        	         articlecategory_UpdatedDate.DateEditType = 13;
        	                	                	                		                	        articlecategory_UpdatedDate.FieldPermissions = true;

        	        
                                        articlecategory_UpdatedDate.Container = tablearticlecategory;
        	        tablearticlecategory.Fields.Add("UpdatedDate", articlecategory_UpdatedDate);
                builder.Tables.Add("articlecategory", tablearticlecategory);
                builder.SubSonicTables.Add("articlecategory", tablearticlecategory);
                Table tablecatedetailproduct = new Table();
                tablecatedetailproduct.ShortName = "catedetailproduct";
                tablecatedetailproduct.TableName = "catedetailproduct";
                            tablecatedetailproduct.NumberOfChars = 80;
                tablecatedetailproduct.DataSourceTable = "catedetailproduct";
                tablecatedetailproduct.OwnerID = "";
                    Field catedetailproduct_CateDetailID = new Field();
                    catedetailproduct_CateDetailID.Name = "CateDetailID";
        	        catedetailproduct_CateDetailID.Label = "Cate Detail ID";
        	        
        	        

                                            catedetailproduct_CateDetailID.IsSearchable = true;

                                            catedetailproduct_CateDetailID.ShowOnListPage = true;

                    catedetailproduct_CateDetailID.LinkNewWindow = 0;
                    catedetailproduct_CateDetailID.LinkDisplay = 0;
                    catedetailproduct_CateDetailID.LinkParam = "";

        	        catedetailproduct_CateDetailID.FieldType = 200;
        	        catedetailproduct_CateDetailID.EditFormat = "Text field";
        	        catedetailproduct_CateDetailID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        catedetailproduct_CateDetailID.NeedEncode = true;

                    catedetailproduct_CateDetailID.ControlType = 0;

        	        catedetailproduct_CateDetailID.GoodName = "CateDetailID";
        	                	        catedetailproduct_CateDetailID.FullName = "CateDetailID";
        	        
        	                	        
        	        
        	        catedetailproduct_CateDetailID.Index = 1;
        	        
        	                	                	        catedetailproduct_CateDetailID.EditParams = "";
        	                	        catedetailproduct_CateDetailID.EditParams = catedetailproduct_CateDetailID.EditParams + " maxlength=40";
        	                	                		                	        catedetailproduct_CateDetailID.FieldPermissions = true;

        	        
                                        catedetailproduct_CateDetailID.Container = tablecatedetailproduct;
        	        tablecatedetailproduct.Fields.Add("CateDetailID", catedetailproduct_CateDetailID);
                    Field catedetailproduct_ProID = new Field();
                    catedetailproduct_ProID.Name = "ProID";
        	        catedetailproduct_ProID.Label = "Pro ID";
        	        
        	        

                                            catedetailproduct_ProID.IsSearchable = true;

                                            catedetailproduct_ProID.ShowOnListPage = true;

                    catedetailproduct_ProID.LinkNewWindow = 0;
                    catedetailproduct_ProID.LinkDisplay = 0;
                    catedetailproduct_ProID.LinkParam = "";

        	        catedetailproduct_ProID.FieldType = 200;
        	        catedetailproduct_ProID.EditFormat = "Text field";
        	        catedetailproduct_ProID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        catedetailproduct_ProID.NeedEncode = true;

                    catedetailproduct_ProID.ControlType = 0;

        	        catedetailproduct_ProID.GoodName = "ProID";
        	                	        catedetailproduct_ProID.FullName = "ProID";
        	        
        	                	        
        	        
        	        catedetailproduct_ProID.Index = 2;
        	        
        	                	                	        catedetailproduct_ProID.EditParams = "";
        	                	        catedetailproduct_ProID.EditParams = catedetailproduct_ProID.EditParams + " maxlength=40";
        	                	                		                	        catedetailproduct_ProID.FieldPermissions = true;

        	        
                                        catedetailproduct_ProID.Container = tablecatedetailproduct;
        	        tablecatedetailproduct.Fields.Add("ProID", catedetailproduct_ProID);
                    Field catedetailproduct_ProName = new Field();
                    catedetailproduct_ProName.Name = "ProName";
        	        catedetailproduct_ProName.Label = "Pro Name";
        	        
        	        

                                            catedetailproduct_ProName.IsSearchable = true;

                                            catedetailproduct_ProName.ShowOnListPage = true;

                    catedetailproduct_ProName.LinkNewWindow = 0;
                    catedetailproduct_ProName.LinkDisplay = 0;
                    catedetailproduct_ProName.LinkParam = "";

        	        catedetailproduct_ProName.FieldType = 200;
        	        catedetailproduct_ProName.EditFormat = "Text field";
        	        catedetailproduct_ProName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        catedetailproduct_ProName.NeedEncode = true;

                    catedetailproduct_ProName.ControlType = 0;

        	        catedetailproduct_ProName.GoodName = "ProName";
        	                	        catedetailproduct_ProName.FullName = "ProName";
        	        
        	                	        
        	        
        	        catedetailproduct_ProName.Index = 3;
        	        
        	                	                	        catedetailproduct_ProName.EditParams = "";
        	                	        catedetailproduct_ProName.EditParams = catedetailproduct_ProName.EditParams + " maxlength=255";
        	                	                		                	        catedetailproduct_ProName.FieldPermissions = true;

        	        
                                        catedetailproduct_ProName.Container = tablecatedetailproduct;
        	        tablecatedetailproduct.Fields.Add("ProName", catedetailproduct_ProName);
                    Field catedetailproduct_Price = new Field();
                    catedetailproduct_Price.Name = "Price";
        	        
        	        
        	        

                                            catedetailproduct_Price.IsSearchable = true;

                                            catedetailproduct_Price.ShowOnListPage = true;

                    catedetailproduct_Price.LinkNewWindow = 0;
                    catedetailproduct_Price.LinkDisplay = 0;
                    catedetailproduct_Price.LinkParam = "";

        	        catedetailproduct_Price.FieldType = 200;
        	        catedetailproduct_Price.EditFormat = "Text field";
        	        catedetailproduct_Price.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        catedetailproduct_Price.NeedEncode = true;

                    catedetailproduct_Price.ControlType = 0;

        	        catedetailproduct_Price.GoodName = "Price";
        	                	        catedetailproduct_Price.FullName = "Price";
        	        
        	                	        
        	        
        	        catedetailproduct_Price.Index = 4;
        	        
        	                	                	        catedetailproduct_Price.EditParams = "";
        	                	        catedetailproduct_Price.EditParams = catedetailproduct_Price.EditParams + " maxlength=20";
        	                	                		                	        catedetailproduct_Price.FieldPermissions = true;

        	        
                                        catedetailproduct_Price.Container = tablecatedetailproduct;
        	        tablecatedetailproduct.Fields.Add("Price", catedetailproduct_Price);
                    Field catedetailproduct_Quantity = new Field();
                    catedetailproduct_Quantity.Name = "Quantity";
        	        
        	        
        	        

                                            catedetailproduct_Quantity.IsSearchable = true;

                                            catedetailproduct_Quantity.ShowOnListPage = true;

                    catedetailproduct_Quantity.LinkNewWindow = 0;
                    catedetailproduct_Quantity.LinkDisplay = 0;
                    catedetailproduct_Quantity.LinkParam = "";

        	        catedetailproduct_Quantity.FieldType = 5;
        	        catedetailproduct_Quantity.EditFormat = "Text field";
        	        catedetailproduct_Quantity.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        catedetailproduct_Quantity.NeedEncode = true;

                    catedetailproduct_Quantity.ControlType = 0;

        	        catedetailproduct_Quantity.GoodName = "Quantity";
        	                	        catedetailproduct_Quantity.FullName = "Quantity";
        	        
        	                	        
        	        
        	        catedetailproduct_Quantity.Index = 5;
        	        
        	                	                	        catedetailproduct_Quantity.EditParams = "";
        	                	                	                		                	        catedetailproduct_Quantity.FieldPermissions = true;

        	        
                                        catedetailproduct_Quantity.Container = tablecatedetailproduct;
        	        tablecatedetailproduct.Fields.Add("Quantity", catedetailproduct_Quantity);
                builder.Tables.Add("catedetailproduct", tablecatedetailproduct);
                builder.SubSonicTables.Add("catedetailproduct", tablecatedetailproduct);
                Table tablecategory = new Table();
                tablecategory.ShortName = "category";
                tablecategory.TableName = "category";
                            tablecategory.NumberOfChars = 80;
                tablecategory.DataSourceTable = "category";
                tablecategory.OwnerID = "";
                    Field category_CateID = new Field();
                    category_CateID.Name = "CateID";
        	        category_CateID.Label = "Cate ID";
        	        
        	        

                                            category_CateID.IsSearchable = true;

                                            category_CateID.ShowOnListPage = true;

                    category_CateID.LinkNewWindow = 0;
                    category_CateID.LinkDisplay = 0;
                    category_CateID.LinkParam = "";

        	        category_CateID.FieldType = 200;
        	        category_CateID.EditFormat = "Text field";
        	        category_CateID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        category_CateID.NeedEncode = true;

                    category_CateID.ControlType = 0;

        	        category_CateID.GoodName = "CateID";
        	                	        category_CateID.FullName = "CateID";
        	        
        	                	        
        	        
        	        category_CateID.Index = 1;
        	        
        	                	                	        category_CateID.EditParams = "";
        	                	        category_CateID.EditParams = category_CateID.EditParams + " maxlength=40";
        	                	                		                	        category_CateID.FieldPermissions = true;

        	        
                                        category_CateID.Container = tablecategory;
        	        tablecategory.Fields.Add("CateID", category_CateID);
                    Field category_CateName = new Field();
                    category_CateName.Name = "CateName";
        	        category_CateName.Label = "Cate Name";
        	        
        	        

                                            category_CateName.IsSearchable = true;

                                            category_CateName.ShowOnListPage = true;

                    category_CateName.LinkNewWindow = 0;
                    category_CateName.LinkDisplay = 0;
                    category_CateName.LinkParam = "";

        	        category_CateName.FieldType = 200;
        	        category_CateName.EditFormat = "Text field";
        	        category_CateName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        category_CateName.NeedEncode = true;

                    category_CateName.ControlType = 0;

        	        category_CateName.GoodName = "CateName";
        	                	        category_CateName.FullName = "CateName";
        	        
        	                	        
        	        
        	        category_CateName.Index = 2;
        	        
        	                	                	        category_CateName.EditParams = "";
        	                	        category_CateName.EditParams = category_CateName.EditParams + " maxlength=255";
        	                	                		                	        category_CateName.FieldPermissions = true;

        	        
                                        category_CateName.Container = tablecategory;
        	        tablecategory.Fields.Add("CateName", category_CateName);
                    Field category_CateParent = new Field();
                    category_CateParent.Name = "CateParent";
        	        category_CateParent.Label = "Cate Parent";
        	        
        	        

                                            category_CateParent.IsSearchable = true;

                                            category_CateParent.ShowOnListPage = true;

                    category_CateParent.LinkNewWindow = 0;
                    category_CateParent.LinkDisplay = 0;
                    category_CateParent.LinkParam = "";

        	        category_CateParent.FieldType = 200;
        	        category_CateParent.EditFormat = "Lookup wizard";
        	        category_CateParent.ViewFormat = "";
        	        
        	        
        	        
        	                	        category_CateParent.LookupType = 1;
        	                	        category_CateParent.LookupWhere = "";
        	        category_CateParent.LinkField = "`CateID`";
        	                	        category_CateParent.DisplayField = "`CateName`";
        	        category_CateParent.LookupTable = "category";
        	                	                	                	        category_CateParent.NeedEncode = true;

                    category_CateParent.ControlType = 0;

        	        category_CateParent.GoodName = "CateParent";
        	                	        category_CateParent.FullName = "CateParent";
        	        
        	                	        
        	        
        	        category_CateParent.Index = 3;
        	        
        	                	                	                		                	        category_CateParent.FieldPermissions = true;

        	        
                                            category_CateParent.AddNewItem =  false ;
                                                    category_CateParent.AdvancedAdd = true;
		                    category_CateParent.AddPage = "category_add.aspx";
                        category_CateParent.LinkField = "CateID";
                        category_CateParent.DisplayField = "CateName";
                        category_CateParent.LookupTable = "category";
                        category_CateParent.StrSize = 1;
                        		                                                
                                                		
		                                        		     category_CateParent.OrderBy = "CateName";
		                                            category_CateParent.Container = tablecategory;
        	        tablecategory.Fields.Add("CateParent", category_CateParent);
                    Field category_Description = new Field();
                    category_Description.Name = "Description";
        	        
        	        
        	        

                                            category_Description.IsSearchable = true;

                                            category_Description.ShowOnListPage = true;

                    category_Description.LinkNewWindow = 0;
                    category_Description.LinkDisplay = 0;
                    category_Description.LinkParam = "";

        	        category_Description.FieldType = 200;
        	        category_Description.EditFormat = "Text field";
        	        category_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        category_Description.NeedEncode = true;

                    category_Description.ControlType = 0;

        	        category_Description.GoodName = "Description";
        	                	        category_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        category_Description.Index = 4;
        	        
        	                	                	        category_Description.EditParams = "";
        	                	        category_Description.EditParams = category_Description.EditParams + " maxlength=500";
        	                	                		                	        category_Description.FieldPermissions = true;

        	        
                                        category_Description.Container = tablecategory;
        	        tablecategory.Fields.Add("Description", category_Description);
                    Field category_VipLevel = new Field();
                    category_VipLevel.Name = "VipLevel";
        	        category_VipLevel.Label = "Vip Level";
        	        
        	        

                                            category_VipLevel.IsSearchable = true;

                                            category_VipLevel.ShowOnListPage = true;

                    category_VipLevel.LinkNewWindow = 0;
                    category_VipLevel.LinkDisplay = 0;
                    category_VipLevel.LinkParam = "";

        	        category_VipLevel.FieldType = 3;
        	        category_VipLevel.EditFormat = "Lookup wizard";
        	        category_VipLevel.ViewFormat = "";
        	        
        	        
        	        
        	                	        category_VipLevel.LookupType = 0;
        	                	                	                	                	        category_VipLevel.NeedEncode = true;

                    category_VipLevel.ControlType = 0;

        	        category_VipLevel.GoodName = "VipLevel";
        	                	        category_VipLevel.FullName = "VipLevel";
        	        
        	                	        
        	        
        	        category_VipLevel.Index = 5;
        	        
        	                	                	                		                	        category_VipLevel.FieldPermissions = true;

        	        
                                            category_VipLevel.AddNewItem =  false ;
                                                category_VipLevel.LinkField = "";
                        category_VipLevel.DisplayField = "";
                        category_VipLevel.LookupTable = "";
                        category_VipLevel.StrSize = 1;
                                                    int dcategory_VipLevel = 0;
		                    category_VipLevel.Arr.Add(dcategory_VipLevel,"0");
		                    dcategory_VipLevel = dcategory_VipLevel + 1;
		                    category_VipLevel.Arr.Add(dcategory_VipLevel,"1");
		                    dcategory_VipLevel = dcategory_VipLevel + 1;
		                    category_VipLevel.Arr.Add(dcategory_VipLevel,"2");
		                    dcategory_VipLevel = dcategory_VipLevel + 1;
		                    category_VipLevel.Arr.Add(dcategory_VipLevel,"3");
		                    dcategory_VipLevel = dcategory_VipLevel + 1;
		                    category_VipLevel.Arr.Add(dcategory_VipLevel,"4");
		                    dcategory_VipLevel = dcategory_VipLevel + 1;
		                    category_VipLevel.Arr.Add(dcategory_VipLevel,"5");
		                    dcategory_VipLevel = dcategory_VipLevel + 1;
                    category_VipLevel.Container = tablecategory;
				        category_VipLevel.LookupFields.Add(new LookupField("0", "0"));
				        category_VipLevel.LookupFields.Add(new LookupField("1", "1"));
				        category_VipLevel.LookupFields.Add(new LookupField("2", "2"));
				        category_VipLevel.LookupFields.Add(new LookupField("3", "3"));
				        category_VipLevel.LookupFields.Add(new LookupField("4", "4"));
				        category_VipLevel.LookupFields.Add(new LookupField("5", "5"));
        	        tablecategory.Fields.Add("VipLevel", category_VipLevel);
                    Field category_Active = new Field();
                    category_Active.Name = "Active";
        	        
        	        
        	        

                                            category_Active.IsSearchable = true;

                                            category_Active.ShowOnListPage = true;

                    category_Active.LinkNewWindow = 0;
                    category_Active.LinkDisplay = 0;
                    category_Active.LinkParam = "";

        	        category_Active.FieldType = 13;
        	        category_Active.EditFormat = "Lookup wizard";
        	        category_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        category_Active.LookupType = 0;
        	                	                	                	        
                    category_Active.ControlType = 0;

        	        category_Active.GoodName = "Active";
        	                	        category_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        category_Active.Index = 6;
        	        
        	                	                	                		                	        category_Active.FieldPermissions = true;

        	        
                                            category_Active.AddNewItem =  false ;
                                                category_Active.LinkField = "";
                        category_Active.DisplayField = "";
                        category_Active.LookupTable = "";
                        category_Active.StrSize = 1;
                                                    int dcategory_Active = 0;
		                    category_Active.Arr.Add(dcategory_Active,"True");
		                    dcategory_Active = dcategory_Active + 1;
		                    category_Active.Arr.Add(dcategory_Active,"False");
		                    dcategory_Active = dcategory_Active + 1;
                    category_Active.Container = tablecategory;
				        category_Active.LookupFields.Add(new LookupField("True", "True"));
				        category_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablecategory.Fields.Add("Active", category_Active);
                    Field category_Price = new Field();
                    category_Price.Name = "Price";
        	        
        	        
        	        

                                            category_Price.IsSearchable = true;

                                            category_Price.ShowOnListPage = true;

                    category_Price.LinkNewWindow = 0;
                    category_Price.LinkDisplay = 0;
                    category_Price.LinkParam = "";

        	        category_Price.FieldType = 5;
        	        category_Price.EditFormat = "Text field";
        	        category_Price.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        category_Price.NeedEncode = true;

                    category_Price.ControlType = 0;

        	        category_Price.GoodName = "Price";
        	                	        category_Price.FullName = "Price";
        	        
        	                	        
        	        
        	        category_Price.Index = 7;
        	        
        	                	                	        category_Price.EditParams = "";
        	                	                	                		                	        category_Price.FieldPermissions = true;

        	        
                                        category_Price.Container = tablecategory;
        	        tablecategory.Fields.Add("Price", category_Price);
                    Field category_Image = new Field();
                    category_Image.Name = "Image";
        	        
        	        
        	        

                                            category_Image.IsSearchable = true;

                                            category_Image.ShowOnListPage = true;

                    category_Image.LinkNewWindow = 0;
                    category_Image.LinkDisplay = 0;
                    category_Image.LinkParam = "";

        	        category_Image.FieldType = 200;
        	        category_Image.EditFormat = "Text field";
        	        category_Image.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        category_Image.NeedEncode = true;

                    category_Image.ControlType = 0;

        	        category_Image.GoodName = "Image";
        	                	        category_Image.FullName = "Image";
        	        
        	                	        
        	        
        	        category_Image.Index = 8;
        	        
        	                	                	        category_Image.EditParams = "";
        	                	        category_Image.EditParams = category_Image.EditParams + " maxlength=1000";
        	                	                		                	        category_Image.FieldPermissions = true;

        	        
                                        category_Image.Container = tablecategory;
        	        tablecategory.Fields.Add("Image", category_Image);
                    Field category_Status = new Field();
                    category_Status.Name = "Status";
        	        
        	        
        	        

                                            category_Status.IsSearchable = true;

                                            category_Status.ShowOnListPage = true;

                    category_Status.LinkNewWindow = 0;
                    category_Status.LinkDisplay = 0;
                    category_Status.LinkParam = "";

        	        category_Status.FieldType = 3;
        	        category_Status.EditFormat = "Lookup wizard";
        	        category_Status.ViewFormat = "";
        	        
        	        
        	        
        	                	        category_Status.LookupType = 0;
        	                	                	                	                	        category_Status.NeedEncode = true;

                    category_Status.ControlType = 0;

        	        category_Status.GoodName = "Status";
        	                	        category_Status.FullName = "Status";
        	        
        	                	        
        	        
        	        category_Status.Index = 9;
        	        
        	                	                	                		                	        category_Status.FieldPermissions = true;

        	        
                                            category_Status.AddNewItem =  false ;
                                                category_Status.LinkField = "";
                        category_Status.DisplayField = "";
                        category_Status.LookupTable = "";
                        category_Status.StrSize = 1;
                                                    int dcategory_Status = 0;
		                    category_Status.Arr.Add(dcategory_Status,"0");
		                    dcategory_Status = dcategory_Status + 1;
		                    category_Status.Arr.Add(dcategory_Status,"1");
		                    dcategory_Status = dcategory_Status + 1;
                    category_Status.Container = tablecategory;
				        category_Status.LookupFields.Add(new LookupField("0", "0"));
				        category_Status.LookupFields.Add(new LookupField("1", "1"));
        	        tablecategory.Fields.Add("Status", category_Status);
                    Field category_CreatedDate = new Field();
                    category_CreatedDate.Name = "CreatedDate";
        	        category_CreatedDate.Label = "Created Date";
        	        
        	        

                                            category_CreatedDate.IsSearchable = true;

                                            category_CreatedDate.ShowOnListPage = true;

                    category_CreatedDate.LinkNewWindow = 0;
                    category_CreatedDate.LinkDisplay = 0;
                    category_CreatedDate.LinkParam = "";

        	        category_CreatedDate.FieldType = 135;
        	        category_CreatedDate.EditFormat = "Date";
        	        category_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        category_CreatedDate.NeedEncode = true;

                    category_CreatedDate.ControlType = 0;

        	        category_CreatedDate.GoodName = "CreatedDate";
        	                	        category_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        category_CreatedDate.Index = 10;
        	         category_CreatedDate.DateEditType = 13;
        	                	                	                		                	        category_CreatedDate.FieldPermissions = true;

        	        
                                        category_CreatedDate.Container = tablecategory;
        	        tablecategory.Fields.Add("CreatedDate", category_CreatedDate);
                    Field category_UpdatedDate = new Field();
                    category_UpdatedDate.Name = "UpdatedDate";
        	        category_UpdatedDate.Label = "Updated Date";
        	        
        	        

                                            category_UpdatedDate.IsSearchable = true;

                                            category_UpdatedDate.ShowOnListPage = true;

                    category_UpdatedDate.LinkNewWindow = 0;
                    category_UpdatedDate.LinkDisplay = 0;
                    category_UpdatedDate.LinkParam = "";

        	        category_UpdatedDate.FieldType = 135;
        	        category_UpdatedDate.EditFormat = "Date";
        	        category_UpdatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        category_UpdatedDate.NeedEncode = true;

                    category_UpdatedDate.ControlType = 0;

        	        category_UpdatedDate.GoodName = "UpdatedDate";
        	                	        category_UpdatedDate.FullName = "UpdatedDate";
        	        
        	                	        
        	        
        	        category_UpdatedDate.Index = 11;
        	         category_UpdatedDate.DateEditType = 13;
        	                	                	                		                	        category_UpdatedDate.FieldPermissions = true;

        	        
                                        category_UpdatedDate.Container = tablecategory;
        	        tablecategory.Fields.Add("UpdatedDate", category_UpdatedDate);
                builder.Tables.Add("category", tablecategory);
                builder.SubSonicTables.Add("category", tablecategory);
                Table tablecategorydetail = new Table();
                tablecategorydetail.ShortName = "categorydetail";
                tablecategorydetail.TableName = "categorydetail";
                            tablecategorydetail.NumberOfChars = 80;
                tablecategorydetail.DataSourceTable = "categorydetail";
                tablecategorydetail.OwnerID = "";
                    Field categorydetail_CateDetailID = new Field();
                    categorydetail_CateDetailID.Name = "CateDetailID";
        	        categorydetail_CateDetailID.Label = "Cate Detail ID";
        	        
        	        

                                            categorydetail_CateDetailID.IsSearchable = true;

                                            categorydetail_CateDetailID.ShowOnListPage = true;

                    categorydetail_CateDetailID.LinkNewWindow = 0;
                    categorydetail_CateDetailID.LinkDisplay = 0;
                    categorydetail_CateDetailID.LinkParam = "";

        	        categorydetail_CateDetailID.FieldType = 200;
        	        categorydetail_CateDetailID.EditFormat = "Text field";
        	        categorydetail_CateDetailID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        categorydetail_CateDetailID.NeedEncode = true;

                    categorydetail_CateDetailID.ControlType = 0;

        	        categorydetail_CateDetailID.GoodName = "CateDetailID";
        	                	        categorydetail_CateDetailID.FullName = "CateDetailID";
        	        
        	                	        
        	        
        	        categorydetail_CateDetailID.Index = 1;
        	        
        	                	                	        categorydetail_CateDetailID.EditParams = "";
        	                	        categorydetail_CateDetailID.EditParams = categorydetail_CateDetailID.EditParams + " maxlength=40";
        	                	                		                	        categorydetail_CateDetailID.FieldPermissions = true;

        	        
                                        categorydetail_CateDetailID.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("CateDetailID", categorydetail_CateDetailID);
                    Field categorydetail_Name = new Field();
                    categorydetail_Name.Name = "Name";
        	        
        	        
        	        

                                            categorydetail_Name.IsSearchable = true;

                                            categorydetail_Name.ShowOnListPage = true;

                    categorydetail_Name.LinkNewWindow = 0;
                    categorydetail_Name.LinkDisplay = 0;
                    categorydetail_Name.LinkParam = "";

        	        categorydetail_Name.FieldType = 200;
        	        categorydetail_Name.EditFormat = "Text field";
        	        categorydetail_Name.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        categorydetail_Name.NeedEncode = true;

                    categorydetail_Name.ControlType = 0;

        	        categorydetail_Name.GoodName = "Name";
        	                	        categorydetail_Name.FullName = "Name";
        	        
        	                	        
        	        
        	        categorydetail_Name.Index = 2;
        	        
        	                	                	        categorydetail_Name.EditParams = "";
        	                	        categorydetail_Name.EditParams = categorydetail_Name.EditParams + " maxlength=255";
        	                	                		                	        categorydetail_Name.FieldPermissions = true;

        	        
                                        categorydetail_Name.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("Name", categorydetail_Name);
                    Field categorydetail_CateID = new Field();
                    categorydetail_CateID.Name = "CateID";
        	        categorydetail_CateID.Label = "Cate ID";
        	        
        	        

                                            categorydetail_CateID.IsSearchable = true;

                                            categorydetail_CateID.ShowOnListPage = true;

                    categorydetail_CateID.LinkNewWindow = 0;
                    categorydetail_CateID.LinkDisplay = 0;
                    categorydetail_CateID.LinkParam = "";

        	        categorydetail_CateID.FieldType = 200;
        	        categorydetail_CateID.EditFormat = "Lookup wizard";
        	        categorydetail_CateID.ViewFormat = "";
        	        
        	        
        	        
        	                	        categorydetail_CateID.LookupType = 1;
        	                	        categorydetail_CateID.LookupWhere = "";
        	        categorydetail_CateID.LinkField = "`CateID`";
        	                	        categorydetail_CateID.DisplayField = "`CateName`";
        	        categorydetail_CateID.LookupTable = "category";
        	                	                	                	        categorydetail_CateID.NeedEncode = true;

                    categorydetail_CateID.ControlType = 0;

        	        categorydetail_CateID.GoodName = "CateID";
        	                	        categorydetail_CateID.FullName = "CateID";
        	        
        	                	        
        	        
        	        categorydetail_CateID.Index = 3;
        	        
        	                	                	                		                	        categorydetail_CateID.FieldPermissions = true;

        	        
                                            categorydetail_CateID.AddNewItem =  false ;
                                                    categorydetail_CateID.AdvancedAdd = true;
		                    categorydetail_CateID.AddPage = "category_add.aspx";
                        categorydetail_CateID.LinkField = "CateID";
                        categorydetail_CateID.DisplayField = "CateName";
                        categorydetail_CateID.LookupTable = "category";
                        categorydetail_CateID.StrSize = 1;
                        		                                                
                                                		
		                                        		     categorydetail_CateID.OrderBy = "CateName";
		                                            categorydetail_CateID.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("CateID", categorydetail_CateID);
                    Field categorydetail_Description = new Field();
                    categorydetail_Description.Name = "Description";
        	        
        	        
        	        

                                            categorydetail_Description.IsSearchable = true;

                                            categorydetail_Description.ShowOnListPage = true;

                    categorydetail_Description.LinkNewWindow = 0;
                    categorydetail_Description.LinkDisplay = 0;
                    categorydetail_Description.LinkParam = "";

        	        categorydetail_Description.FieldType = 200;
        	        categorydetail_Description.EditFormat = "Text field";
        	        categorydetail_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        categorydetail_Description.NeedEncode = true;

                    categorydetail_Description.ControlType = 0;

        	        categorydetail_Description.GoodName = "Description";
        	                	        categorydetail_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        categorydetail_Description.Index = 4;
        	        
        	                	                	        categorydetail_Description.EditParams = "";
        	                	        categorydetail_Description.EditParams = categorydetail_Description.EditParams + " maxlength=500";
        	                	                		                	        categorydetail_Description.FieldPermissions = true;

        	        
                                        categorydetail_Description.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("Description", categorydetail_Description);
                    Field categorydetail_VipLevel = new Field();
                    categorydetail_VipLevel.Name = "VipLevel";
        	        categorydetail_VipLevel.Label = "Vip Level";
        	        
        	        

                                            categorydetail_VipLevel.IsSearchable = true;

                                            categorydetail_VipLevel.ShowOnListPage = true;

                    categorydetail_VipLevel.LinkNewWindow = 0;
                    categorydetail_VipLevel.LinkDisplay = 0;
                    categorydetail_VipLevel.LinkParam = "";

        	        categorydetail_VipLevel.FieldType = 3;
        	        categorydetail_VipLevel.EditFormat = "Lookup wizard";
        	        categorydetail_VipLevel.ViewFormat = "";
        	        
        	        
        	        
        	                	        categorydetail_VipLevel.LookupType = 0;
        	                	                	                	                	        categorydetail_VipLevel.NeedEncode = true;

                    categorydetail_VipLevel.ControlType = 0;

        	        categorydetail_VipLevel.GoodName = "VipLevel";
        	                	        categorydetail_VipLevel.FullName = "VipLevel";
        	        
        	                	        
        	        
        	        categorydetail_VipLevel.Index = 5;
        	        
        	                	                	                		                	        categorydetail_VipLevel.FieldPermissions = true;

        	        
                                            categorydetail_VipLevel.AddNewItem =  false ;
                                                categorydetail_VipLevel.LinkField = "";
                        categorydetail_VipLevel.DisplayField = "";
                        categorydetail_VipLevel.LookupTable = "";
                        categorydetail_VipLevel.StrSize = 1;
                                                    int dcategorydetail_VipLevel = 0;
		                    categorydetail_VipLevel.Arr.Add(dcategorydetail_VipLevel,"0");
		                    dcategorydetail_VipLevel = dcategorydetail_VipLevel + 1;
		                    categorydetail_VipLevel.Arr.Add(dcategorydetail_VipLevel,"1");
		                    dcategorydetail_VipLevel = dcategorydetail_VipLevel + 1;
		                    categorydetail_VipLevel.Arr.Add(dcategorydetail_VipLevel,"2");
		                    dcategorydetail_VipLevel = dcategorydetail_VipLevel + 1;
		                    categorydetail_VipLevel.Arr.Add(dcategorydetail_VipLevel,"3");
		                    dcategorydetail_VipLevel = dcategorydetail_VipLevel + 1;
		                    categorydetail_VipLevel.Arr.Add(dcategorydetail_VipLevel,"4");
		                    dcategorydetail_VipLevel = dcategorydetail_VipLevel + 1;
		                    categorydetail_VipLevel.Arr.Add(dcategorydetail_VipLevel,"5");
		                    dcategorydetail_VipLevel = dcategorydetail_VipLevel + 1;
                    categorydetail_VipLevel.Container = tablecategorydetail;
				        categorydetail_VipLevel.LookupFields.Add(new LookupField("0", "0"));
				        categorydetail_VipLevel.LookupFields.Add(new LookupField("1", "1"));
				        categorydetail_VipLevel.LookupFields.Add(new LookupField("2", "2"));
				        categorydetail_VipLevel.LookupFields.Add(new LookupField("3", "3"));
				        categorydetail_VipLevel.LookupFields.Add(new LookupField("4", "4"));
				        categorydetail_VipLevel.LookupFields.Add(new LookupField("5", "5"));
        	        tablecategorydetail.Fields.Add("VipLevel", categorydetail_VipLevel);
                    Field categorydetail_Active = new Field();
                    categorydetail_Active.Name = "Active";
        	        
        	        
        	        

                                            categorydetail_Active.IsSearchable = true;

                                            categorydetail_Active.ShowOnListPage = true;

                    categorydetail_Active.LinkNewWindow = 0;
                    categorydetail_Active.LinkDisplay = 0;
                    categorydetail_Active.LinkParam = "";

        	        categorydetail_Active.FieldType = 13;
        	        categorydetail_Active.EditFormat = "Lookup wizard";
        	        categorydetail_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        categorydetail_Active.LookupType = 0;
        	                	                	                	        
                    categorydetail_Active.ControlType = 0;

        	        categorydetail_Active.GoodName = "Active";
        	                	        categorydetail_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        categorydetail_Active.Index = 6;
        	        
        	                	                	                		                	        categorydetail_Active.FieldPermissions = true;

        	        
                                            categorydetail_Active.AddNewItem =  false ;
                                                categorydetail_Active.LinkField = "";
                        categorydetail_Active.DisplayField = "";
                        categorydetail_Active.LookupTable = "";
                        categorydetail_Active.StrSize = 1;
                                                    int dcategorydetail_Active = 0;
		                    categorydetail_Active.Arr.Add(dcategorydetail_Active,"True");
		                    dcategorydetail_Active = dcategorydetail_Active + 1;
		                    categorydetail_Active.Arr.Add(dcategorydetail_Active,"False");
		                    dcategorydetail_Active = dcategorydetail_Active + 1;
                    categorydetail_Active.Container = tablecategorydetail;
				        categorydetail_Active.LookupFields.Add(new LookupField("True", "True"));
				        categorydetail_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablecategorydetail.Fields.Add("Active", categorydetail_Active);
                    Field categorydetail_Image = new Field();
                    categorydetail_Image.Name = "Image";
        	        
        	        
        	        

                                            categorydetail_Image.IsSearchable = true;

                                            categorydetail_Image.ShowOnListPage = true;

                    categorydetail_Image.LinkNewWindow = 0;
                    categorydetail_Image.LinkDisplay = 0;
                    categorydetail_Image.LinkParam = "";

        	        categorydetail_Image.FieldType = 200;
        	        categorydetail_Image.EditFormat = "Text field";
        	        categorydetail_Image.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        categorydetail_Image.NeedEncode = true;

                    categorydetail_Image.ControlType = 0;

        	        categorydetail_Image.GoodName = "Image";
        	                	        categorydetail_Image.FullName = "Image";
        	        
        	                	        
        	        
        	        categorydetail_Image.Index = 7;
        	        
        	                	                	        categorydetail_Image.EditParams = "";
        	                	        categorydetail_Image.EditParams = categorydetail_Image.EditParams + " maxlength=1000";
        	                	                		                	        categorydetail_Image.FieldPermissions = true;

        	        
                                        categorydetail_Image.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("Image", categorydetail_Image);
                    Field categorydetail_Price = new Field();
                    categorydetail_Price.Name = "Price";
        	        
        	        
        	        

                                            categorydetail_Price.IsSearchable = true;

                                            categorydetail_Price.ShowOnListPage = true;

                    categorydetail_Price.LinkNewWindow = 0;
                    categorydetail_Price.LinkDisplay = 0;
                    categorydetail_Price.LinkParam = "";

        	        categorydetail_Price.FieldType = 200;
        	        categorydetail_Price.EditFormat = "Text field";
        	        categorydetail_Price.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        categorydetail_Price.NeedEncode = true;

                    categorydetail_Price.ControlType = 0;

        	        categorydetail_Price.GoodName = "Price";
        	                	        categorydetail_Price.FullName = "Price";
        	        
        	                	        
        	        
        	        categorydetail_Price.Index = 8;
        	        
        	                	                	        categorydetail_Price.EditParams = "";
        	                	        categorydetail_Price.EditParams = categorydetail_Price.EditParams + " maxlength=20";
        	                	                		                	        categorydetail_Price.FieldPermissions = true;

        	        
                                        categorydetail_Price.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("Price", categorydetail_Price);
                    Field categorydetail_Status = new Field();
                    categorydetail_Status.Name = "Status";
        	        
        	        
        	        

                                            categorydetail_Status.IsSearchable = true;

                                            categorydetail_Status.ShowOnListPage = true;

                    categorydetail_Status.LinkNewWindow = 0;
                    categorydetail_Status.LinkDisplay = 0;
                    categorydetail_Status.LinkParam = "";

        	        categorydetail_Status.FieldType = 3;
        	        categorydetail_Status.EditFormat = "Lookup wizard";
        	        categorydetail_Status.ViewFormat = "";
        	        
        	        
        	        
        	                	        categorydetail_Status.LookupType = 0;
        	                	                	                	                	        categorydetail_Status.NeedEncode = true;

                    categorydetail_Status.ControlType = 0;

        	        categorydetail_Status.GoodName = "Status";
        	                	        categorydetail_Status.FullName = "Status";
        	        
        	                	        
        	        
        	        categorydetail_Status.Index = 9;
        	        
        	                	                	                		                	        categorydetail_Status.FieldPermissions = true;

        	        
                                            categorydetail_Status.AddNewItem =  false ;
                                                categorydetail_Status.LinkField = "";
                        categorydetail_Status.DisplayField = "";
                        categorydetail_Status.LookupTable = "";
                        categorydetail_Status.StrSize = 1;
                                                    int dcategorydetail_Status = 0;
		                    categorydetail_Status.Arr.Add(dcategorydetail_Status,"0");
		                    dcategorydetail_Status = dcategorydetail_Status + 1;
		                    categorydetail_Status.Arr.Add(dcategorydetail_Status,"1");
		                    dcategorydetail_Status = dcategorydetail_Status + 1;
                    categorydetail_Status.Container = tablecategorydetail;
				        categorydetail_Status.LookupFields.Add(new LookupField("0", "0"));
				        categorydetail_Status.LookupFields.Add(new LookupField("1", "1"));
        	        tablecategorydetail.Fields.Add("Status", categorydetail_Status);
                    Field categorydetail_Quantity = new Field();
                    categorydetail_Quantity.Name = "Quantity";
        	        
        	        
        	        

                                            categorydetail_Quantity.IsSearchable = true;

                                            categorydetail_Quantity.ShowOnListPage = true;

                    categorydetail_Quantity.LinkNewWindow = 0;
                    categorydetail_Quantity.LinkDisplay = 0;
                    categorydetail_Quantity.LinkParam = "";

        	        categorydetail_Quantity.FieldType = 5;
        	        categorydetail_Quantity.EditFormat = "Text field";
        	        categorydetail_Quantity.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        categorydetail_Quantity.NeedEncode = true;

                    categorydetail_Quantity.ControlType = 0;

        	        categorydetail_Quantity.GoodName = "Quantity";
        	                	        categorydetail_Quantity.FullName = "Quantity";
        	        
        	                	        
        	        
        	        categorydetail_Quantity.Index = 10;
        	        
        	                	                	        categorydetail_Quantity.EditParams = "";
        	                	                	                		                	        categorydetail_Quantity.FieldPermissions = true;

        	        
                                        categorydetail_Quantity.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("Quantity", categorydetail_Quantity);
                    Field categorydetail_QuantitySold = new Field();
                    categorydetail_QuantitySold.Name = "QuantitySold";
        	        categorydetail_QuantitySold.Label = "Quantity Sold";
        	        
        	        

                                            categorydetail_QuantitySold.IsSearchable = true;

                                            categorydetail_QuantitySold.ShowOnListPage = true;

                    categorydetail_QuantitySold.LinkNewWindow = 0;
                    categorydetail_QuantitySold.LinkDisplay = 0;
                    categorydetail_QuantitySold.LinkParam = "";

        	        categorydetail_QuantitySold.FieldType = 5;
        	        categorydetail_QuantitySold.EditFormat = "Text field";
        	        categorydetail_QuantitySold.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        categorydetail_QuantitySold.NeedEncode = true;

                    categorydetail_QuantitySold.ControlType = 0;

        	        categorydetail_QuantitySold.GoodName = "QuantitySold";
        	                	        categorydetail_QuantitySold.FullName = "QuantitySold";
        	        
        	                	        
        	        
        	        categorydetail_QuantitySold.Index = 11;
        	        
        	                	                	        categorydetail_QuantitySold.EditParams = "";
        	                	                	                		                	        categorydetail_QuantitySold.FieldPermissions = true;

        	        
                                        categorydetail_QuantitySold.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("QuantitySold", categorydetail_QuantitySold);
                    Field categorydetail_CreatedDate = new Field();
                    categorydetail_CreatedDate.Name = "CreatedDate";
        	        categorydetail_CreatedDate.Label = "Created Date";
        	        
        	        

                                            categorydetail_CreatedDate.IsSearchable = true;

                                            categorydetail_CreatedDate.ShowOnListPage = true;

                    categorydetail_CreatedDate.LinkNewWindow = 0;
                    categorydetail_CreatedDate.LinkDisplay = 0;
                    categorydetail_CreatedDate.LinkParam = "";

        	        categorydetail_CreatedDate.FieldType = 135;
        	        categorydetail_CreatedDate.EditFormat = "Date";
        	        categorydetail_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        categorydetail_CreatedDate.NeedEncode = true;

                    categorydetail_CreatedDate.ControlType = 0;

        	        categorydetail_CreatedDate.GoodName = "CreatedDate";
        	                	        categorydetail_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        categorydetail_CreatedDate.Index = 12;
        	         categorydetail_CreatedDate.DateEditType = 13;
        	                	                	                		                	        categorydetail_CreatedDate.FieldPermissions = true;

        	        
                                        categorydetail_CreatedDate.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("CreatedDate", categorydetail_CreatedDate);
                    Field categorydetail_UpdatedDate = new Field();
                    categorydetail_UpdatedDate.Name = "UpdatedDate";
        	        categorydetail_UpdatedDate.Label = "Updated Date";
        	        
        	        

                                            categorydetail_UpdatedDate.IsSearchable = true;

                                            categorydetail_UpdatedDate.ShowOnListPage = true;

                    categorydetail_UpdatedDate.LinkNewWindow = 0;
                    categorydetail_UpdatedDate.LinkDisplay = 0;
                    categorydetail_UpdatedDate.LinkParam = "";

        	        categorydetail_UpdatedDate.FieldType = 135;
        	        categorydetail_UpdatedDate.EditFormat = "Date";
        	        categorydetail_UpdatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        categorydetail_UpdatedDate.NeedEncode = true;

                    categorydetail_UpdatedDate.ControlType = 0;

        	        categorydetail_UpdatedDate.GoodName = "UpdatedDate";
        	                	        categorydetail_UpdatedDate.FullName = "UpdatedDate";
        	        
        	                	        
        	        
        	        categorydetail_UpdatedDate.Index = 13;
        	         categorydetail_UpdatedDate.DateEditType = 13;
        	                	                	                		                	        categorydetail_UpdatedDate.FieldPermissions = true;

        	        
                                        categorydetail_UpdatedDate.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("UpdatedDate", categorydetail_UpdatedDate);
                    Field categorydetail_Hot = new Field();
                    categorydetail_Hot.Name = "Hot";
        	        
        	        
        	        

                                            categorydetail_Hot.IsSearchable = true;

                                            categorydetail_Hot.ShowOnListPage = true;

                    categorydetail_Hot.LinkNewWindow = 0;
                    categorydetail_Hot.LinkDisplay = 0;
                    categorydetail_Hot.LinkParam = "";

        	        categorydetail_Hot.FieldType = 13;
        	        categorydetail_Hot.EditFormat = "Checkbox";
        	        categorydetail_Hot.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	                	        
                    categorydetail_Hot.ControlType = 0;

        	        categorydetail_Hot.GoodName = "Hot";
        	                	        categorydetail_Hot.FullName = "Hot";
        	        
        	                	        
        	        
        	        categorydetail_Hot.Index = 14;
        	        
        	                	                	                		                	        categorydetail_Hot.FieldPermissions = true;

        	        
                                        categorydetail_Hot.Container = tablecategorydetail;
        	        tablecategorydetail.Fields.Add("Hot", categorydetail_Hot);
                builder.Tables.Add("categorydetail", tablecategorydetail);
                builder.SubSonicTables.Add("categorydetail", tablecategorydetail);
                Table tablecustomer = new Table();
                tablecustomer.ShortName = "customer";
                tablecustomer.TableName = "customer";
                            tablecustomer.NumberOfChars = 80;
                tablecustomer.DataSourceTable = "customer";
                tablecustomer.OwnerID = "";
                    Field customer_ID = new Field();
                    customer_ID.Name = "ID";
        	        
        	        
        	        

                                            customer_ID.IsSearchable = true;

                                            customer_ID.ShowOnListPage = true;

                    customer_ID.LinkNewWindow = 0;
                    customer_ID.LinkDisplay = 0;
                    customer_ID.LinkParam = "";

        	        customer_ID.FieldType = 200;
        	        customer_ID.EditFormat = "Text field";
        	        customer_ID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_ID.NeedEncode = true;

                    customer_ID.ControlType = 0;

        	        customer_ID.GoodName = "ID";
        	                	        customer_ID.FullName = "ID";
        	        
        	                	        
        	        
        	        customer_ID.Index = 1;
        	        
        	                	                	        customer_ID.EditParams = "";
        	                	        customer_ID.EditParams = customer_ID.EditParams + " maxlength=40";
        	                	                		                	        customer_ID.FieldPermissions = true;

        	        
                                        customer_ID.Container = tablecustomer;
        	        tablecustomer.Fields.Add("ID", customer_ID);
                    Field customer_FullName = new Field();
                    customer_FullName.Name = "FullName";
        	        customer_FullName.Label = "Full Name";
        	        
        	        

                                            customer_FullName.IsSearchable = true;

                                            customer_FullName.ShowOnListPage = true;

                    customer_FullName.LinkNewWindow = 0;
                    customer_FullName.LinkDisplay = 0;
                    customer_FullName.LinkParam = "";

        	        customer_FullName.FieldType = 200;
        	        customer_FullName.EditFormat = "Text field";
        	        customer_FullName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_FullName.NeedEncode = true;

                    customer_FullName.ControlType = 0;

        	        customer_FullName.GoodName = "FullName";
        	                	        customer_FullName.FullName = "FullName";
        	        
        	                	        
        	        
        	        customer_FullName.Index = 2;
        	        
        	                	                	        customer_FullName.EditParams = "";
        	                	        customer_FullName.EditParams = customer_FullName.EditParams + " maxlength=255";
        	                	                		                	        customer_FullName.FieldPermissions = true;

        	        
                                        customer_FullName.Container = tablecustomer;
        	        tablecustomer.Fields.Add("FullName", customer_FullName);
                    Field customer_ContactAddress = new Field();
                    customer_ContactAddress.Name = "ContactAddress";
        	        customer_ContactAddress.Label = "Contact Address";
        	        
        	        

                                            customer_ContactAddress.IsSearchable = true;

                                            customer_ContactAddress.ShowOnListPage = true;

                    customer_ContactAddress.LinkNewWindow = 0;
                    customer_ContactAddress.LinkDisplay = 0;
                    customer_ContactAddress.LinkParam = "";

        	        customer_ContactAddress.FieldType = 200;
        	        customer_ContactAddress.EditFormat = "Text field";
        	        customer_ContactAddress.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_ContactAddress.NeedEncode = true;

                    customer_ContactAddress.ControlType = 0;

        	        customer_ContactAddress.GoodName = "ContactAddress";
        	                	        customer_ContactAddress.FullName = "ContactAddress";
        	        
        	                	        
        	        
        	        customer_ContactAddress.Index = 3;
        	        
        	                	                	        customer_ContactAddress.EditParams = "";
        	                	        customer_ContactAddress.EditParams = customer_ContactAddress.EditParams + " maxlength=500";
        	                	                		                	        customer_ContactAddress.FieldPermissions = true;

        	        
                                        customer_ContactAddress.Container = tablecustomer;
        	        tablecustomer.Fields.Add("ContactAddress", customer_ContactAddress);
                    Field customer_DeliveryAddress = new Field();
                    customer_DeliveryAddress.Name = "DeliveryAddress";
        	        customer_DeliveryAddress.Label = "Delivery Address";
        	        
        	        

                                            customer_DeliveryAddress.IsSearchable = true;

                                            customer_DeliveryAddress.ShowOnListPage = true;

                    customer_DeliveryAddress.LinkNewWindow = 0;
                    customer_DeliveryAddress.LinkDisplay = 0;
                    customer_DeliveryAddress.LinkParam = "";

        	        customer_DeliveryAddress.FieldType = 200;
        	        customer_DeliveryAddress.EditFormat = "Text field";
        	        customer_DeliveryAddress.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_DeliveryAddress.NeedEncode = true;

                    customer_DeliveryAddress.ControlType = 0;

        	        customer_DeliveryAddress.GoodName = "DeliveryAddress";
        	                	        customer_DeliveryAddress.FullName = "DeliveryAddress";
        	        
        	                	        
        	        
        	        customer_DeliveryAddress.Index = 4;
        	        
        	                	                	        customer_DeliveryAddress.EditParams = "";
        	                	        customer_DeliveryAddress.EditParams = customer_DeliveryAddress.EditParams + " maxlength=500";
        	                	                		                	        customer_DeliveryAddress.FieldPermissions = true;

        	        
                                        customer_DeliveryAddress.Container = tablecustomer;
        	        tablecustomer.Fields.Add("DeliveryAddress", customer_DeliveryAddress);
                    Field customer_Phone = new Field();
                    customer_Phone.Name = "Phone";
        	        
        	        
        	        

                                            customer_Phone.IsSearchable = true;

                                            customer_Phone.ShowOnListPage = true;

                    customer_Phone.LinkNewWindow = 0;
                    customer_Phone.LinkDisplay = 0;
                    customer_Phone.LinkParam = "";

        	        customer_Phone.FieldType = 200;
        	        customer_Phone.EditFormat = "Text field";
        	        customer_Phone.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_Phone.NeedEncode = true;

                    customer_Phone.ControlType = 0;

        	        customer_Phone.GoodName = "Phone";
        	                	        customer_Phone.FullName = "Phone";
        	        
        	                	        
        	        
        	        customer_Phone.Index = 5;
        	        
        	                	                	        customer_Phone.EditParams = "";
        	                	        customer_Phone.EditParams = customer_Phone.EditParams + " maxlength=20";
        	                	                		                	        customer_Phone.FieldPermissions = true;

        	        
                                        customer_Phone.Container = tablecustomer;
        	        tablecustomer.Fields.Add("Phone", customer_Phone);
                    Field customer_Email = new Field();
                    customer_Email.Name = "Email";
        	        
        	        
        	        

                                            customer_Email.IsSearchable = true;

                                            customer_Email.ShowOnListPage = true;

                    customer_Email.LinkNewWindow = 0;
                    customer_Email.LinkDisplay = 0;
                    customer_Email.LinkParam = "";

        	        customer_Email.FieldType = 200;
        	        customer_Email.EditFormat = "Text field";
        	        customer_Email.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_Email.NeedEncode = true;

                    customer_Email.ControlType = 0;

        	        customer_Email.GoodName = "Email";
        	                	        customer_Email.FullName = "Email";
        	        
        	                	        
        	        
        	        customer_Email.Index = 6;
        	        
        	                	                	        customer_Email.EditParams = "";
        	                	        customer_Email.EditParams = customer_Email.EditParams + " maxlength=125";
        	                	                		                	        customer_Email.FieldPermissions = true;

        	        
                                        customer_Email.Container = tablecustomer;
        	        tablecustomer.Fields.Add("Email", customer_Email);
                    Field customer_Description = new Field();
                    customer_Description.Name = "Description";
        	        
        	        
        	        

                                            customer_Description.IsSearchable = true;

                                            customer_Description.ShowOnListPage = true;

                    customer_Description.LinkNewWindow = 0;
                    customer_Description.LinkDisplay = 0;
                    customer_Description.LinkParam = "";

        	        customer_Description.FieldType = 200;
        	        customer_Description.EditFormat = "Text field";
        	        customer_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        customer_Description.NeedEncode = true;

                    customer_Description.ControlType = 0;

        	        customer_Description.GoodName = "Description";
        	                	        customer_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        customer_Description.Index = 7;
        	        
        	                	                	        customer_Description.EditParams = "";
        	                	        customer_Description.EditParams = customer_Description.EditParams + " maxlength=500";
        	                	                		                	        customer_Description.FieldPermissions = true;

        	        
                                        customer_Description.Container = tablecustomer;
        	        tablecustomer.Fields.Add("Description", customer_Description);
                    Field customer_CreatedDate = new Field();
                    customer_CreatedDate.Name = "CreatedDate";
        	        customer_CreatedDate.Label = "Created Date";
        	        
        	        

                                            customer_CreatedDate.IsSearchable = true;

                                            customer_CreatedDate.ShowOnListPage = true;

                    customer_CreatedDate.LinkNewWindow = 0;
                    customer_CreatedDate.LinkDisplay = 0;
                    customer_CreatedDate.LinkParam = "";

        	        customer_CreatedDate.FieldType = 135;
        	        customer_CreatedDate.EditFormat = "Date";
        	        customer_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        customer_CreatedDate.NeedEncode = true;

                    customer_CreatedDate.ControlType = 0;

        	        customer_CreatedDate.GoodName = "CreatedDate";
        	                	        customer_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        customer_CreatedDate.Index = 8;
        	         customer_CreatedDate.DateEditType = 13;
        	                	                	                		                	        customer_CreatedDate.FieldPermissions = true;

        	        
                                        customer_CreatedDate.Container = tablecustomer;
        	        tablecustomer.Fields.Add("CreatedDate", customer_CreatedDate);
                builder.Tables.Add("customer", tablecustomer);
                builder.SubSonicTables.Add("customer", tablecustomer);
                Table tablefeedback = new Table();
                tablefeedback.ShortName = "feedback";
                tablefeedback.TableName = "feedback";
                            tablefeedback.NumberOfChars = 80;
                tablefeedback.DataSourceTable = "feedback";
                tablefeedback.OwnerID = "";
                    Field feedback_ID = new Field();
                    feedback_ID.Name = "ID";
        	        
        	        
        	        

                                            feedback_ID.IsSearchable = true;

                                            feedback_ID.ShowOnListPage = true;

                    feedback_ID.LinkNewWindow = 0;
                    feedback_ID.LinkDisplay = 0;
                    feedback_ID.LinkParam = "";

        	        feedback_ID.FieldType = 200;
        	        feedback_ID.EditFormat = "Text field";
        	        feedback_ID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        feedback_ID.NeedEncode = true;

                    feedback_ID.ControlType = 0;

        	        feedback_ID.GoodName = "ID";
        	                	        feedback_ID.FullName = "ID";
        	        
        	                	        
        	        
        	        feedback_ID.Index = 1;
        	        
        	                	                	        feedback_ID.EditParams = "";
        	                	        feedback_ID.EditParams = feedback_ID.EditParams + " maxlength=40";
        	                	                		                	        feedback_ID.FieldPermissions = true;

        	        
                                        feedback_ID.Container = tablefeedback;
        	        tablefeedback.Fields.Add("ID", feedback_ID);
                    Field feedback_Fullname = new Field();
                    feedback_Fullname.Name = "Fullname";
        	        
        	        
        	        

                                            feedback_Fullname.IsSearchable = true;

                                            feedback_Fullname.ShowOnListPage = true;

                    feedback_Fullname.LinkNewWindow = 0;
                    feedback_Fullname.LinkDisplay = 0;
                    feedback_Fullname.LinkParam = "";

        	        feedback_Fullname.FieldType = 200;
        	        feedback_Fullname.EditFormat = "Text field";
        	        feedback_Fullname.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        feedback_Fullname.NeedEncode = true;

                    feedback_Fullname.ControlType = 0;

        	        feedback_Fullname.GoodName = "Fullname";
        	                	        feedback_Fullname.FullName = "Fullname";
        	        
        	                	        
        	        
        	        feedback_Fullname.Index = 2;
        	        
        	                	                	        feedback_Fullname.EditParams = "";
        	                	        feedback_Fullname.EditParams = feedback_Fullname.EditParams + " maxlength=125";
        	                	                		                	        feedback_Fullname.FieldPermissions = true;

        	        
                                        feedback_Fullname.Container = tablefeedback;
        	        tablefeedback.Fields.Add("Fullname", feedback_Fullname);
                    Field feedback_Email = new Field();
                    feedback_Email.Name = "Email";
        	        
        	        
        	        

                                            feedback_Email.IsSearchable = true;

                                            feedback_Email.ShowOnListPage = true;

                    feedback_Email.LinkNewWindow = 0;
                    feedback_Email.LinkDisplay = 0;
                    feedback_Email.LinkParam = "";

        	        feedback_Email.FieldType = 200;
        	        feedback_Email.EditFormat = "Text field";
        	        feedback_Email.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        feedback_Email.NeedEncode = true;

                    feedback_Email.ControlType = 0;

        	        feedback_Email.GoodName = "Email";
        	                	        feedback_Email.FullName = "Email";
        	        
        	                	        
        	        
        	        feedback_Email.Index = 3;
        	        
        	                	                	        feedback_Email.EditParams = "";
        	                	        feedback_Email.EditParams = feedback_Email.EditParams + " maxlength=125";
        	                	                		                	        feedback_Email.FieldPermissions = true;

        	        
                                        feedback_Email.Container = tablefeedback;
        	        tablefeedback.Fields.Add("Email", feedback_Email);
                    Field feedback_Phone = new Field();
                    feedback_Phone.Name = "Phone";
        	        
        	        
        	        

                                            feedback_Phone.IsSearchable = true;

                                            feedback_Phone.ShowOnListPage = true;

                    feedback_Phone.LinkNewWindow = 0;
                    feedback_Phone.LinkDisplay = 0;
                    feedback_Phone.LinkParam = "";

        	        feedback_Phone.FieldType = 200;
        	        feedback_Phone.EditFormat = "Text field";
        	        feedback_Phone.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        feedback_Phone.NeedEncode = true;

                    feedback_Phone.ControlType = 0;

        	        feedback_Phone.GoodName = "Phone";
        	                	        feedback_Phone.FullName = "Phone";
        	        
        	                	        
        	        
        	        feedback_Phone.Index = 4;
        	        
        	                	                	        feedback_Phone.EditParams = "";
        	                	        feedback_Phone.EditParams = feedback_Phone.EditParams + " maxlength=20";
        	                	                		                	        feedback_Phone.FieldPermissions = true;

        	        
                                        feedback_Phone.Container = tablefeedback;
        	        tablefeedback.Fields.Add("Phone", feedback_Phone);
                    Field feedback_Company = new Field();
                    feedback_Company.Name = "Company";
        	        
        	        
        	        

                                            feedback_Company.IsSearchable = true;

                                            feedback_Company.ShowOnListPage = true;

                    feedback_Company.LinkNewWindow = 0;
                    feedback_Company.LinkDisplay = 0;
                    feedback_Company.LinkParam = "";

        	        feedback_Company.FieldType = 200;
        	        feedback_Company.EditFormat = "Text field";
        	        feedback_Company.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        feedback_Company.NeedEncode = true;

                    feedback_Company.ControlType = 0;

        	        feedback_Company.GoodName = "Company";
        	                	        feedback_Company.FullName = "Company";
        	        
        	                	        
        	        
        	        feedback_Company.Index = 5;
        	        
        	                	                	        feedback_Company.EditParams = "";
        	                	        feedback_Company.EditParams = feedback_Company.EditParams + " maxlength=255";
        	                	                		                	        feedback_Company.FieldPermissions = true;

        	        
                                        feedback_Company.Container = tablefeedback;
        	        tablefeedback.Fields.Add("Company", feedback_Company);
                    Field feedback_Content = new Field();
                    feedback_Content.Name = "Content";
        	        
        	        
        	        

                                            feedback_Content.IsSearchable = true;

                                            feedback_Content.ShowOnListPage = true;

                    feedback_Content.LinkNewWindow = 0;
                    feedback_Content.LinkDisplay = 0;
                    feedback_Content.LinkParam = "";

        	        feedback_Content.FieldType = 200;
        	        feedback_Content.EditFormat = "Text field";
        	        feedback_Content.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        feedback_Content.NeedEncode = true;

                    feedback_Content.ControlType = 0;

        	        feedback_Content.GoodName = "Content";
        	                	        feedback_Content.FullName = "Content";
        	        
        	                	        
        	        
        	        feedback_Content.Index = 6;
        	        
        	                	                	        feedback_Content.EditParams = "";
        	                	        feedback_Content.EditParams = feedback_Content.EditParams + " maxlength=1000";
        	                	                		                	        feedback_Content.FieldPermissions = true;

        	        
                                        feedback_Content.Container = tablefeedback;
        	        tablefeedback.Fields.Add("Content", feedback_Content);
                    Field feedback_Active = new Field();
                    feedback_Active.Name = "Active";
        	        
        	        
        	        

                                            feedback_Active.IsSearchable = true;

                                            feedback_Active.ShowOnListPage = true;

                    feedback_Active.LinkNewWindow = 0;
                    feedback_Active.LinkDisplay = 0;
                    feedback_Active.LinkParam = "";

        	        feedback_Active.FieldType = 13;
        	        feedback_Active.EditFormat = "Lookup wizard";
        	        feedback_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        feedback_Active.LookupType = 0;
        	                	                	                	        
                    feedback_Active.ControlType = 0;

        	        feedback_Active.GoodName = "Active";
        	                	        feedback_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        feedback_Active.Index = 7;
        	        
        	                	                	                		                	        feedback_Active.FieldPermissions = true;

        	        
                                            feedback_Active.AddNewItem =  false ;
                                                feedback_Active.LinkField = "";
                        feedback_Active.DisplayField = "";
                        feedback_Active.LookupTable = "";
                        feedback_Active.StrSize = 1;
                                                    int dfeedback_Active = 0;
		                    feedback_Active.Arr.Add(dfeedback_Active,"True");
		                    dfeedback_Active = dfeedback_Active + 1;
		                    feedback_Active.Arr.Add(dfeedback_Active,"False");
		                    dfeedback_Active = dfeedback_Active + 1;
                    feedback_Active.Container = tablefeedback;
				        feedback_Active.LookupFields.Add(new LookupField("True", "True"));
				        feedback_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablefeedback.Fields.Add("Active", feedback_Active);
                    Field feedback_Status = new Field();
                    feedback_Status.Name = "Status";
        	        
        	        
        	        

                                            feedback_Status.IsSearchable = true;

                                            feedback_Status.ShowOnListPage = true;

                    feedback_Status.LinkNewWindow = 0;
                    feedback_Status.LinkDisplay = 0;
                    feedback_Status.LinkParam = "";

        	        feedback_Status.FieldType = 3;
        	        feedback_Status.EditFormat = "Lookup wizard";
        	        feedback_Status.ViewFormat = "";
        	        
        	        
        	        
        	                	        feedback_Status.LookupType = 0;
        	                	                	                	                	        feedback_Status.NeedEncode = true;

                    feedback_Status.ControlType = 0;

        	        feedback_Status.GoodName = "Status";
        	                	        feedback_Status.FullName = "Status";
        	        
        	                	        
        	        
        	        feedback_Status.Index = 8;
        	        
        	                	                	                		                	        feedback_Status.FieldPermissions = true;

        	        
                                            feedback_Status.AddNewItem =  false ;
                                                feedback_Status.LinkField = "";
                        feedback_Status.DisplayField = "";
                        feedback_Status.LookupTable = "";
                        feedback_Status.StrSize = 1;
                                                    int dfeedback_Status = 0;
		                    feedback_Status.Arr.Add(dfeedback_Status,"0");
		                    dfeedback_Status = dfeedback_Status + 1;
		                    feedback_Status.Arr.Add(dfeedback_Status,"1");
		                    dfeedback_Status = dfeedback_Status + 1;
                    feedback_Status.Container = tablefeedback;
				        feedback_Status.LookupFields.Add(new LookupField("0", "0"));
				        feedback_Status.LookupFields.Add(new LookupField("1", "1"));
        	        tablefeedback.Fields.Add("Status", feedback_Status);
                    Field feedback_CreatedDate = new Field();
                    feedback_CreatedDate.Name = "CreatedDate";
        	        feedback_CreatedDate.Label = "Created Date";
        	        
        	        

                                            feedback_CreatedDate.IsSearchable = true;

                                            feedback_CreatedDate.ShowOnListPage = true;

                    feedback_CreatedDate.LinkNewWindow = 0;
                    feedback_CreatedDate.LinkDisplay = 0;
                    feedback_CreatedDate.LinkParam = "";

        	        feedback_CreatedDate.FieldType = 135;
        	        feedback_CreatedDate.EditFormat = "Date";
        	        feedback_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        feedback_CreatedDate.NeedEncode = true;

                    feedback_CreatedDate.ControlType = 0;

        	        feedback_CreatedDate.GoodName = "CreatedDate";
        	                	        feedback_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        feedback_CreatedDate.Index = 9;
        	         feedback_CreatedDate.DateEditType = 13;
        	                	                	                		                	        feedback_CreatedDate.FieldPermissions = true;

        	        
                                        feedback_CreatedDate.Container = tablefeedback;
        	        tablefeedback.Fields.Add("CreatedDate", feedback_CreatedDate);
                builder.Tables.Add("feedback", tablefeedback);
                builder.SubSonicTables.Add("feedback", tablefeedback);
                Table tableforum = new Table();
                tableforum.ShortName = "forum";
                tableforum.TableName = "forum";
                            tableforum.NumberOfChars = 80;
                tableforum.DataSourceTable = "forum";
                tableforum.OwnerID = "";
                    Field forum_ID = new Field();
                    forum_ID.Name = "ID";
        	        
        	        
        	        

                                            forum_ID.IsSearchable = true;

                                            forum_ID.ShowOnListPage = true;

                    forum_ID.LinkNewWindow = 0;
                    forum_ID.LinkDisplay = 0;
                    forum_ID.LinkParam = "";

        	        forum_ID.FieldType = 200;
        	        forum_ID.EditFormat = "Text field";
        	        forum_ID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        forum_ID.NeedEncode = true;

                    forum_ID.ControlType = 0;

        	        forum_ID.GoodName = "ID";
        	                	        forum_ID.FullName = "ID";
        	        
        	                	        
        	        
        	        forum_ID.Index = 1;
        	        
        	                	                	        forum_ID.EditParams = "";
        	                	        forum_ID.EditParams = forum_ID.EditParams + " maxlength=40";
        	                	                		                	        forum_ID.FieldPermissions = true;

        	        
                                        forum_ID.Container = tableforum;
        	        tableforum.Fields.Add("ID", forum_ID);
                    Field forum_FullName = new Field();
                    forum_FullName.Name = "FullName";
        	        forum_FullName.Label = "Full Name";
        	        
        	        

                                            forum_FullName.IsSearchable = true;

                                            forum_FullName.ShowOnListPage = true;

                    forum_FullName.LinkNewWindow = 0;
                    forum_FullName.LinkDisplay = 0;
                    forum_FullName.LinkParam = "";

        	        forum_FullName.FieldType = 200;
        	        forum_FullName.EditFormat = "Text field";
        	        forum_FullName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        forum_FullName.NeedEncode = true;

                    forum_FullName.ControlType = 0;

        	        forum_FullName.GoodName = "FullName";
        	                	        forum_FullName.FullName = "FullName";
        	        
        	                	        
        	        
        	        forum_FullName.Index = 2;
        	        
        	                	                	        forum_FullName.EditParams = "";
        	                	        forum_FullName.EditParams = forum_FullName.EditParams + " maxlength=125";
        	                	                		                	        forum_FullName.FieldPermissions = true;

        	        
                                        forum_FullName.Container = tableforum;
        	        tableforum.Fields.Add("FullName", forum_FullName);
                    Field forum_Email = new Field();
                    forum_Email.Name = "Email";
        	        
        	        
        	        

                                            forum_Email.IsSearchable = true;

                                            forum_Email.ShowOnListPage = true;

                    forum_Email.LinkNewWindow = 0;
                    forum_Email.LinkDisplay = 0;
                    forum_Email.LinkParam = "";

        	        forum_Email.FieldType = 200;
        	        forum_Email.EditFormat = "Text field";
        	        forum_Email.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        forum_Email.NeedEncode = true;

                    forum_Email.ControlType = 0;

        	        forum_Email.GoodName = "Email";
        	                	        forum_Email.FullName = "Email";
        	        
        	                	        
        	        
        	        forum_Email.Index = 3;
        	        
        	                	                	        forum_Email.EditParams = "";
        	                	        forum_Email.EditParams = forum_Email.EditParams + " maxlength=125";
        	                	                		                	        forum_Email.FieldPermissions = true;

        	        
                                        forum_Email.Container = tableforum;
        	        tableforum.Fields.Add("Email", forum_Email);
                    Field forum_Rating = new Field();
                    forum_Rating.Name = "Rating";
        	        
        	        
        	        

                                            forum_Rating.IsSearchable = true;

                                            forum_Rating.ShowOnListPage = true;

                    forum_Rating.LinkNewWindow = 0;
                    forum_Rating.LinkDisplay = 0;
                    forum_Rating.LinkParam = "";

        	        forum_Rating.FieldType = 3;
        	        forum_Rating.EditFormat = "Text field";
        	        forum_Rating.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        forum_Rating.NeedEncode = true;

                    forum_Rating.ControlType = 0;

        	        forum_Rating.GoodName = "Rating";
        	                	        forum_Rating.FullName = "Rating";
        	        
        	                	        
        	        
        	        forum_Rating.Index = 4;
        	        
        	                	                	        forum_Rating.EditParams = "";
        	                	                	                		                	        forum_Rating.FieldPermissions = true;

        	        
                                        forum_Rating.Container = tableforum;
        	        tableforum.Fields.Add("Rating", forum_Rating);
                    Field forum_Content = new Field();
                    forum_Content.Name = "Content";
        	        
        	        
        	        

                                            forum_Content.IsSearchable = true;

                                            forum_Content.ShowOnListPage = true;

                    forum_Content.LinkNewWindow = 0;
                    forum_Content.LinkDisplay = 0;
                    forum_Content.LinkParam = "";

        	        forum_Content.FieldType = 200;
        	        forum_Content.EditFormat = "Text field";
        	        forum_Content.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        forum_Content.NeedEncode = true;

                    forum_Content.ControlType = 0;

        	        forum_Content.GoodName = "Content";
        	                	        forum_Content.FullName = "Content";
        	        
        	                	        
        	        
        	        forum_Content.Index = 5;
        	        
        	                	                	        forum_Content.EditParams = "";
        	                	        forum_Content.EditParams = forum_Content.EditParams + " maxlength=1000";
        	                	                		                	        forum_Content.FieldPermissions = true;

        	        
                                        forum_Content.Container = tableforum;
        	        tableforum.Fields.Add("Content", forum_Content);
                    Field forum_ParentID = new Field();
                    forum_ParentID.Name = "ParentID";
        	        forum_ParentID.Label = "Parent ID";
        	        
        	        

                                            forum_ParentID.IsSearchable = true;

                                            forum_ParentID.ShowOnListPage = true;

                    forum_ParentID.LinkNewWindow = 0;
                    forum_ParentID.LinkDisplay = 0;
                    forum_ParentID.LinkParam = "";

        	        forum_ParentID.FieldType = 200;
        	        forum_ParentID.EditFormat = "Text field";
        	        forum_ParentID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        forum_ParentID.NeedEncode = true;

                    forum_ParentID.ControlType = 0;

        	        forum_ParentID.GoodName = "ParentID";
        	                	        forum_ParentID.FullName = "ParentID";
        	        
        	                	        
        	        
        	        forum_ParentID.Index = 6;
        	        
        	                	                	        forum_ParentID.EditParams = "";
        	                	        forum_ParentID.EditParams = forum_ParentID.EditParams + " maxlength=500";
        	                	                		                	        forum_ParentID.FieldPermissions = true;

        	        
                                        forum_ParentID.Container = tableforum;
        	        tableforum.Fields.Add("ParentID", forum_ParentID);
                    Field forum_Status = new Field();
                    forum_Status.Name = "Status";
        	        
        	        
        	        

                                            forum_Status.IsSearchable = true;

                                            forum_Status.ShowOnListPage = true;

                    forum_Status.LinkNewWindow = 0;
                    forum_Status.LinkDisplay = 0;
                    forum_Status.LinkParam = "";

        	        forum_Status.FieldType = 3;
        	        forum_Status.EditFormat = "Lookup wizard";
        	        forum_Status.ViewFormat = "";
        	        
        	        
        	        
        	                	        forum_Status.LookupType = 0;
        	                	                	                	                	        forum_Status.NeedEncode = true;

                    forum_Status.ControlType = 0;

        	        forum_Status.GoodName = "Status";
        	                	        forum_Status.FullName = "Status";
        	        
        	                	        
        	        
        	        forum_Status.Index = 7;
        	        
        	                	                	                		                	        forum_Status.FieldPermissions = true;

        	        
                                            forum_Status.AddNewItem =  false ;
                                                forum_Status.LinkField = "";
                        forum_Status.DisplayField = "";
                        forum_Status.LookupTable = "";
                        forum_Status.StrSize = 1;
                                                    int dforum_Status = 0;
		                    forum_Status.Arr.Add(dforum_Status,"0");
		                    dforum_Status = dforum_Status + 1;
		                    forum_Status.Arr.Add(dforum_Status,"1");
		                    dforum_Status = dforum_Status + 1;
                    forum_Status.Container = tableforum;
				        forum_Status.LookupFields.Add(new LookupField("0", "0"));
				        forum_Status.LookupFields.Add(new LookupField("1", "1"));
        	        tableforum.Fields.Add("Status", forum_Status);
                    Field forum_Active = new Field();
                    forum_Active.Name = "Active";
        	        
        	        
        	        

                                            forum_Active.IsSearchable = true;

                                            forum_Active.ShowOnListPage = true;

                    forum_Active.LinkNewWindow = 0;
                    forum_Active.LinkDisplay = 0;
                    forum_Active.LinkParam = "";

        	        forum_Active.FieldType = 13;
        	        forum_Active.EditFormat = "Lookup wizard";
        	        forum_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        forum_Active.LookupType = 0;
        	                	                	                	        
                    forum_Active.ControlType = 0;

        	        forum_Active.GoodName = "Active";
        	                	        forum_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        forum_Active.Index = 8;
        	        
        	                	                	                		                	        forum_Active.FieldPermissions = true;

        	        
                                            forum_Active.AddNewItem =  false ;
                                                forum_Active.LinkField = "";
                        forum_Active.DisplayField = "";
                        forum_Active.LookupTable = "";
                        forum_Active.StrSize = 1;
                                                    int dforum_Active = 0;
		                    forum_Active.Arr.Add(dforum_Active,"True");
		                    dforum_Active = dforum_Active + 1;
		                    forum_Active.Arr.Add(dforum_Active,"False");
		                    dforum_Active = dforum_Active + 1;
                    forum_Active.Container = tableforum;
				        forum_Active.LookupFields.Add(new LookupField("True", "True"));
				        forum_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tableforum.Fields.Add("Active", forum_Active);
                    Field forum_CreatedDate = new Field();
                    forum_CreatedDate.Name = "CreatedDate";
        	        forum_CreatedDate.Label = "Created Date";
        	        
        	        

                                            forum_CreatedDate.IsSearchable = true;

                                            forum_CreatedDate.ShowOnListPage = true;

                    forum_CreatedDate.LinkNewWindow = 0;
                    forum_CreatedDate.LinkDisplay = 0;
                    forum_CreatedDate.LinkParam = "";

        	        forum_CreatedDate.FieldType = 135;
        	        forum_CreatedDate.EditFormat = "Date";
        	        forum_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        forum_CreatedDate.NeedEncode = true;

                    forum_CreatedDate.ControlType = 0;

        	        forum_CreatedDate.GoodName = "CreatedDate";
        	                	        forum_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        forum_CreatedDate.Index = 9;
        	         forum_CreatedDate.DateEditType = 13;
        	                	                	                		                	        forum_CreatedDate.FieldPermissions = true;

        	        
                                        forum_CreatedDate.Container = tableforum;
        	        tableforum.Fields.Add("CreatedDate", forum_CreatedDate);
                    Field forum_UpdatedDate = new Field();
                    forum_UpdatedDate.Name = "UpdatedDate";
        	        forum_UpdatedDate.Label = "Updated Date";
        	        
        	        

                                            forum_UpdatedDate.IsSearchable = true;

                                            forum_UpdatedDate.ShowOnListPage = true;

                    forum_UpdatedDate.LinkNewWindow = 0;
                    forum_UpdatedDate.LinkDisplay = 0;
                    forum_UpdatedDate.LinkParam = "";

        	        forum_UpdatedDate.FieldType = 135;
        	        forum_UpdatedDate.EditFormat = "Date";
        	        forum_UpdatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        forum_UpdatedDate.NeedEncode = true;

                    forum_UpdatedDate.ControlType = 0;

        	        forum_UpdatedDate.GoodName = "UpdatedDate";
        	                	        forum_UpdatedDate.FullName = "UpdatedDate";
        	        
        	                	        
        	        
        	        forum_UpdatedDate.Index = 10;
        	         forum_UpdatedDate.DateEditType = 13;
        	                	                	                		                	        forum_UpdatedDate.FieldPermissions = true;

        	        
                                        forum_UpdatedDate.Container = tableforum;
        	        tableforum.Fields.Add("UpdatedDate", forum_UpdatedDate);
                builder.Tables.Add("forum", tableforum);
                builder.SubSonicTables.Add("forum", tableforum);
                Table tableproductdetail = new Table();
                tableproductdetail.ShortName = "productdetail";
                tableproductdetail.TableName = "productdetail";
                            tableproductdetail.NumberOfChars = 80;
                tableproductdetail.DataSourceTable = "productdetail";
                tableproductdetail.OwnerID = "";
                    Field productdetail_ProID = new Field();
                    productdetail_ProID.Name = "ProID";
        	        productdetail_ProID.Label = "Pro ID";
        	        
        	        

                                            productdetail_ProID.IsSearchable = true;

                                            productdetail_ProID.ShowOnListPage = true;

                    productdetail_ProID.LinkNewWindow = 0;
                    productdetail_ProID.LinkDisplay = 0;
                    productdetail_ProID.LinkParam = "";

        	        productdetail_ProID.FieldType = 200;
        	        productdetail_ProID.EditFormat = "Text field";
        	        productdetail_ProID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        productdetail_ProID.NeedEncode = true;

                    productdetail_ProID.ControlType = 0;

        	        productdetail_ProID.GoodName = "ProID";
        	                	        productdetail_ProID.FullName = "ProID";
        	        
        	                	        
        	        
        	        productdetail_ProID.Index = 1;
        	        
        	                	                	        productdetail_ProID.EditParams = "";
        	                	        productdetail_ProID.EditParams = productdetail_ProID.EditParams + " maxlength=40";
        	                	                		                	        productdetail_ProID.FieldPermissions = true;

        	        
                                        productdetail_ProID.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("ProID", productdetail_ProID);
                    Field productdetail_Name = new Field();
                    productdetail_Name.Name = "Name";
        	        
        	        
        	        

                                            productdetail_Name.IsSearchable = true;

                                            productdetail_Name.ShowOnListPage = true;

                    productdetail_Name.LinkNewWindow = 0;
                    productdetail_Name.LinkDisplay = 0;
                    productdetail_Name.LinkParam = "";

        	        productdetail_Name.FieldType = 200;
        	        productdetail_Name.EditFormat = "Text field";
        	        productdetail_Name.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        productdetail_Name.NeedEncode = true;

                    productdetail_Name.ControlType = 0;

        	        productdetail_Name.GoodName = "Name";
        	                	        productdetail_Name.FullName = "Name";
        	        
        	                	        
        	        
        	        productdetail_Name.Index = 2;
        	        
        	                	                	        productdetail_Name.EditParams = "";
        	                	        productdetail_Name.EditParams = productdetail_Name.EditParams + " maxlength=255";
        	                	                		                	        productdetail_Name.FieldPermissions = true;

        	        
                                        productdetail_Name.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("Name", productdetail_Name);
                    Field productdetail_CateDetailID = new Field();
                    productdetail_CateDetailID.Name = "CateDetailID";
        	        productdetail_CateDetailID.Label = "Cate Detail ID";
        	        
        	        

                                            productdetail_CateDetailID.IsSearchable = true;

                                            productdetail_CateDetailID.ShowOnListPage = true;

                    productdetail_CateDetailID.LinkNewWindow = 0;
                    productdetail_CateDetailID.LinkDisplay = 0;
                    productdetail_CateDetailID.LinkParam = "";

        	        productdetail_CateDetailID.FieldType = 200;
        	        productdetail_CateDetailID.EditFormat = "Lookup wizard";
        	        productdetail_CateDetailID.ViewFormat = "";
        	        
        	        
        	        
        	                	        productdetail_CateDetailID.LookupType = 1;
        	                	        productdetail_CateDetailID.LookupWhere = "";
        	        productdetail_CateDetailID.LinkField = "`CateDetailID`";
        	                	        productdetail_CateDetailID.DisplayField = "`Name`";
        	        productdetail_CateDetailID.LookupTable = "categorydetail";
        	                	                	                	        productdetail_CateDetailID.NeedEncode = true;

                    productdetail_CateDetailID.ControlType = 0;

        	        productdetail_CateDetailID.GoodName = "CateDetailID";
        	                	        productdetail_CateDetailID.FullName = "CateDetailID";
        	        
        	                	        
        	        
        	        productdetail_CateDetailID.Index = 3;
        	        
        	                	                	                		                	        productdetail_CateDetailID.FieldPermissions = true;

        	        
                                            productdetail_CateDetailID.AddNewItem =  false ;
                                                    productdetail_CateDetailID.AdvancedAdd = true;
		                    productdetail_CateDetailID.AddPage = "categorydetail_add.aspx";
                        productdetail_CateDetailID.LinkField = "CateDetailID";
                        productdetail_CateDetailID.DisplayField = "Name";
                        productdetail_CateDetailID.LookupTable = "categorydetail";
                        productdetail_CateDetailID.StrSize = 1;
                        		                                                
                                                		
		                                        		     productdetail_CateDetailID.OrderBy = "Name";
		                                            productdetail_CateDetailID.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("CateDetailID", productdetail_CateDetailID);
                    Field productdetail_ProParentID = new Field();
                    productdetail_ProParentID.Name = "ProParentID";
        	        productdetail_ProParentID.Label = "Pro Parent ID";
        	        
        	        

                                            productdetail_ProParentID.IsSearchable = true;

                                            productdetail_ProParentID.ShowOnListPage = true;

                    productdetail_ProParentID.LinkNewWindow = 0;
                    productdetail_ProParentID.LinkDisplay = 0;
                    productdetail_ProParentID.LinkParam = "";

        	        productdetail_ProParentID.FieldType = 200;
        	        productdetail_ProParentID.EditFormat = "Lookup wizard";
        	        productdetail_ProParentID.ViewFormat = "";
        	        
        	        
        	        
        	                	        productdetail_ProParentID.LookupType = 1;
        	                	        productdetail_ProParentID.LookupWhere = "";
        	        productdetail_ProParentID.LinkField = "`ProID`";
        	                	        productdetail_ProParentID.DisplayField = "`Name`";
        	        productdetail_ProParentID.LookupTable = "productdetail";
        	                	                	                	        productdetail_ProParentID.NeedEncode = true;

                    productdetail_ProParentID.ControlType = 0;

        	        productdetail_ProParentID.GoodName = "ProParentID";
        	                	        productdetail_ProParentID.FullName = "ProParentID";
        	        
        	                	        
        	        
        	        productdetail_ProParentID.Index = 4;
        	        
        	                	                	                		                	        productdetail_ProParentID.FieldPermissions = true;

        	        
                                            productdetail_ProParentID.AddNewItem =  false ;
                                                    productdetail_ProParentID.AdvancedAdd = true;
		                    productdetail_ProParentID.AddPage = "productdetail_add.aspx";
                        productdetail_ProParentID.LinkField = "ProID";
                        productdetail_ProParentID.DisplayField = "Name";
                        productdetail_ProParentID.LookupTable = "productdetail";
                        productdetail_ProParentID.StrSize = 1;
                        		                                                
                                                		
		                                        		     productdetail_ProParentID.OrderBy = "Name";
		                                            productdetail_ProParentID.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("ProParentID", productdetail_ProParentID);
                    Field productdetail_Description = new Field();
                    productdetail_Description.Name = "Description";
        	        
        	        
        	        

                                            productdetail_Description.IsSearchable = true;

                                            productdetail_Description.ShowOnListPage = true;

                    productdetail_Description.LinkNewWindow = 0;
                    productdetail_Description.LinkDisplay = 0;
                    productdetail_Description.LinkParam = "";

        	        productdetail_Description.FieldType = 200;
        	        productdetail_Description.EditFormat = "Text field";
        	        productdetail_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        productdetail_Description.NeedEncode = true;

                    productdetail_Description.ControlType = 0;

        	        productdetail_Description.GoodName = "Description";
        	                	        productdetail_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        productdetail_Description.Index = 5;
        	        
        	                	                	        productdetail_Description.EditParams = "";
        	                	        productdetail_Description.EditParams = productdetail_Description.EditParams + " maxlength=500";
        	                	                		                	        productdetail_Description.FieldPermissions = true;

        	        
                                        productdetail_Description.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("Description", productdetail_Description);
                    Field productdetail_VipLevel = new Field();
                    productdetail_VipLevel.Name = "VipLevel";
        	        productdetail_VipLevel.Label = "Vip Level";
        	        
        	        

                                            productdetail_VipLevel.IsSearchable = true;

                                            productdetail_VipLevel.ShowOnListPage = true;

                    productdetail_VipLevel.LinkNewWindow = 0;
                    productdetail_VipLevel.LinkDisplay = 0;
                    productdetail_VipLevel.LinkParam = "";

        	        productdetail_VipLevel.FieldType = 3;
        	        productdetail_VipLevel.EditFormat = "Lookup wizard";
        	        productdetail_VipLevel.ViewFormat = "";
        	        
        	        
        	        
        	                	        productdetail_VipLevel.LookupType = 0;
        	                	                	                	                	        productdetail_VipLevel.NeedEncode = true;

                    productdetail_VipLevel.ControlType = 0;

        	        productdetail_VipLevel.GoodName = "VipLevel";
        	                	        productdetail_VipLevel.FullName = "VipLevel";
        	        
        	                	        
        	        
        	        productdetail_VipLevel.Index = 6;
        	        
        	                	                	                		                	        productdetail_VipLevel.FieldPermissions = true;

        	        
                                            productdetail_VipLevel.AddNewItem =  false ;
                                                productdetail_VipLevel.LinkField = "";
                        productdetail_VipLevel.DisplayField = "";
                        productdetail_VipLevel.LookupTable = "";
                        productdetail_VipLevel.StrSize = 1;
                                                    int dproductdetail_VipLevel = 0;
		                    productdetail_VipLevel.Arr.Add(dproductdetail_VipLevel,"0");
		                    dproductdetail_VipLevel = dproductdetail_VipLevel + 1;
		                    productdetail_VipLevel.Arr.Add(dproductdetail_VipLevel,"1");
		                    dproductdetail_VipLevel = dproductdetail_VipLevel + 1;
		                    productdetail_VipLevel.Arr.Add(dproductdetail_VipLevel,"2");
		                    dproductdetail_VipLevel = dproductdetail_VipLevel + 1;
		                    productdetail_VipLevel.Arr.Add(dproductdetail_VipLevel,"3");
		                    dproductdetail_VipLevel = dproductdetail_VipLevel + 1;
		                    productdetail_VipLevel.Arr.Add(dproductdetail_VipLevel,"4");
		                    dproductdetail_VipLevel = dproductdetail_VipLevel + 1;
		                    productdetail_VipLevel.Arr.Add(dproductdetail_VipLevel,"5");
		                    dproductdetail_VipLevel = dproductdetail_VipLevel + 1;
                    productdetail_VipLevel.Container = tableproductdetail;
				        productdetail_VipLevel.LookupFields.Add(new LookupField("0", "0"));
				        productdetail_VipLevel.LookupFields.Add(new LookupField("1", "1"));
				        productdetail_VipLevel.LookupFields.Add(new LookupField("2", "2"));
				        productdetail_VipLevel.LookupFields.Add(new LookupField("3", "3"));
				        productdetail_VipLevel.LookupFields.Add(new LookupField("4", "4"));
				        productdetail_VipLevel.LookupFields.Add(new LookupField("5", "5"));
        	        tableproductdetail.Fields.Add("VipLevel", productdetail_VipLevel);
                    Field productdetail_Price = new Field();
                    productdetail_Price.Name = "Price";
        	        
        	        
        	        

                                            productdetail_Price.IsSearchable = true;

                                            productdetail_Price.ShowOnListPage = true;

                    productdetail_Price.LinkNewWindow = 0;
                    productdetail_Price.LinkDisplay = 0;
                    productdetail_Price.LinkParam = "";

        	        productdetail_Price.FieldType = 200;
        	        productdetail_Price.EditFormat = "Text field";
        	        productdetail_Price.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        productdetail_Price.NeedEncode = true;

                    productdetail_Price.ControlType = 0;

        	        productdetail_Price.GoodName = "Price";
        	                	        productdetail_Price.FullName = "Price";
        	        
        	                	        
        	        
        	        productdetail_Price.Index = 7;
        	        
        	                	                	        productdetail_Price.EditParams = "";
        	                	        productdetail_Price.EditParams = productdetail_Price.EditParams + " maxlength=20";
        	                	                		                	        productdetail_Price.FieldPermissions = true;

        	        
                                        productdetail_Price.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("Price", productdetail_Price);
                    Field productdetail_Quantity = new Field();
                    productdetail_Quantity.Name = "Quantity";
        	        
        	        
        	        

                                            productdetail_Quantity.IsSearchable = true;

                                            productdetail_Quantity.ShowOnListPage = true;

                    productdetail_Quantity.LinkNewWindow = 0;
                    productdetail_Quantity.LinkDisplay = 0;
                    productdetail_Quantity.LinkParam = "";

        	        productdetail_Quantity.FieldType = 5;
        	        productdetail_Quantity.EditFormat = "Text field";
        	        productdetail_Quantity.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        productdetail_Quantity.NeedEncode = true;

                    productdetail_Quantity.ControlType = 0;

        	        productdetail_Quantity.GoodName = "Quantity";
        	                	        productdetail_Quantity.FullName = "Quantity";
        	        
        	                	        
        	        
        	        productdetail_Quantity.Index = 8;
        	        
        	                	                	        productdetail_Quantity.EditParams = "";
        	                	                	                		                	        productdetail_Quantity.FieldPermissions = true;

        	        
                                        productdetail_Quantity.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("Quantity", productdetail_Quantity);
                    Field productdetail_QuantitySole = new Field();
                    productdetail_QuantitySole.Name = "QuantitySole";
        	        productdetail_QuantitySole.Label = "Quantity Sole";
        	        
        	        

                                            productdetail_QuantitySole.IsSearchable = true;

                                            productdetail_QuantitySole.ShowOnListPage = true;

                    productdetail_QuantitySole.LinkNewWindow = 0;
                    productdetail_QuantitySole.LinkDisplay = 0;
                    productdetail_QuantitySole.LinkParam = "";

        	        productdetail_QuantitySole.FieldType = 5;
        	        productdetail_QuantitySole.EditFormat = "Text field";
        	        productdetail_QuantitySole.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        productdetail_QuantitySole.NeedEncode = true;

                    productdetail_QuantitySole.ControlType = 0;

        	        productdetail_QuantitySole.GoodName = "QuantitySole";
        	                	        productdetail_QuantitySole.FullName = "QuantitySole";
        	        
        	                	        
        	        
        	        productdetail_QuantitySole.Index = 9;
        	        
        	                	                	        productdetail_QuantitySole.EditParams = "";
        	                	                	                		                	        productdetail_QuantitySole.FieldPermissions = true;

        	        
                                        productdetail_QuantitySole.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("QuantitySole", productdetail_QuantitySole);
                    Field productdetail_CreatedDate = new Field();
                    productdetail_CreatedDate.Name = "CreatedDate";
        	        productdetail_CreatedDate.Label = "Created Date";
        	        
        	        

                                            productdetail_CreatedDate.IsSearchable = true;

                                            productdetail_CreatedDate.ShowOnListPage = true;

                    productdetail_CreatedDate.LinkNewWindow = 0;
                    productdetail_CreatedDate.LinkDisplay = 0;
                    productdetail_CreatedDate.LinkParam = "";

        	        productdetail_CreatedDate.FieldType = 135;
        	        productdetail_CreatedDate.EditFormat = "Date";
        	        productdetail_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        productdetail_CreatedDate.NeedEncode = true;

                    productdetail_CreatedDate.ControlType = 0;

        	        productdetail_CreatedDate.GoodName = "CreatedDate";
        	                	        productdetail_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        productdetail_CreatedDate.Index = 10;
        	         productdetail_CreatedDate.DateEditType = 13;
        	                	                	                		                	        productdetail_CreatedDate.FieldPermissions = true;

        	        
                                        productdetail_CreatedDate.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("CreatedDate", productdetail_CreatedDate);
                    Field productdetail_UpdatedDate = new Field();
                    productdetail_UpdatedDate.Name = "UpdatedDate";
        	        productdetail_UpdatedDate.Label = "Updated Date";
        	        
        	        

                                            productdetail_UpdatedDate.IsSearchable = true;

                                            productdetail_UpdatedDate.ShowOnListPage = true;

                    productdetail_UpdatedDate.LinkNewWindow = 0;
                    productdetail_UpdatedDate.LinkDisplay = 0;
                    productdetail_UpdatedDate.LinkParam = "";

        	        productdetail_UpdatedDate.FieldType = 135;
        	        productdetail_UpdatedDate.EditFormat = "Date";
        	        productdetail_UpdatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        productdetail_UpdatedDate.NeedEncode = true;

                    productdetail_UpdatedDate.ControlType = 0;

        	        productdetail_UpdatedDate.GoodName = "UpdatedDate";
        	                	        productdetail_UpdatedDate.FullName = "UpdatedDate";
        	        
        	                	        
        	        
        	        productdetail_UpdatedDate.Index = 11;
        	         productdetail_UpdatedDate.DateEditType = 13;
        	                	                	                		                	        productdetail_UpdatedDate.FieldPermissions = true;

        	        
                                        productdetail_UpdatedDate.Container = tableproductdetail;
        	        tableproductdetail.Fields.Add("UpdatedDate", productdetail_UpdatedDate);
                builder.Tables.Add("productdetail", tableproductdetail);
                builder.SubSonicTables.Add("productdetail", tableproductdetail);
                Table tablereceiveemail = new Table();
                tablereceiveemail.ShortName = "receiveemail";
                tablereceiveemail.TableName = "receiveemail";
                            tablereceiveemail.NumberOfChars = 80;
                tablereceiveemail.DataSourceTable = "receiveemail";
                tablereceiveemail.OwnerID = "";
                    Field receiveemail_Email = new Field();
                    receiveemail_Email.Name = "Email";
        	        
        	        
        	        

                                            receiveemail_Email.IsSearchable = true;

                                            receiveemail_Email.ShowOnListPage = true;

                    receiveemail_Email.LinkNewWindow = 0;
                    receiveemail_Email.LinkDisplay = 0;
                    receiveemail_Email.LinkParam = "";

        	        receiveemail_Email.FieldType = 200;
        	        receiveemail_Email.EditFormat = "Text field";
        	        receiveemail_Email.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        receiveemail_Email.NeedEncode = true;

                    receiveemail_Email.ControlType = 0;

        	        receiveemail_Email.GoodName = "Email";
        	                	        receiveemail_Email.FullName = "Email";
        	        
        	                	        
        	        
        	        receiveemail_Email.Index = 1;
        	        
        	                	                	        receiveemail_Email.EditParams = "";
        	                	        receiveemail_Email.EditParams = receiveemail_Email.EditParams + " maxlength=125";
        	                	                		                	        receiveemail_Email.FieldPermissions = true;

        	        
                                        receiveemail_Email.Container = tablereceiveemail;
        	        tablereceiveemail.Fields.Add("Email", receiveemail_Email);
                    Field receiveemail_Active = new Field();
                    receiveemail_Active.Name = "Active";
        	        
        	        
        	        

                                            receiveemail_Active.IsSearchable = true;

                                            receiveemail_Active.ShowOnListPage = true;

                    receiveemail_Active.LinkNewWindow = 0;
                    receiveemail_Active.LinkDisplay = 0;
                    receiveemail_Active.LinkParam = "";

        	        receiveemail_Active.FieldType = 13;
        	        receiveemail_Active.EditFormat = "Lookup wizard";
        	        receiveemail_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        receiveemail_Active.LookupType = 0;
        	                	                	                	        
                    receiveemail_Active.ControlType = 0;

        	        receiveemail_Active.GoodName = "Active";
        	                	        receiveemail_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        receiveemail_Active.Index = 2;
        	        
        	                	                	                		                	        receiveemail_Active.FieldPermissions = true;

        	        
                                            receiveemail_Active.AddNewItem =  false ;
                                                receiveemail_Active.LinkField = "";
                        receiveemail_Active.DisplayField = "";
                        receiveemail_Active.LookupTable = "";
                        receiveemail_Active.StrSize = 1;
                                                    int dreceiveemail_Active = 0;
		                    receiveemail_Active.Arr.Add(dreceiveemail_Active,"True");
		                    dreceiveemail_Active = dreceiveemail_Active + 1;
		                    receiveemail_Active.Arr.Add(dreceiveemail_Active,"False");
		                    dreceiveemail_Active = dreceiveemail_Active + 1;
                    receiveemail_Active.Container = tablereceiveemail;
				        receiveemail_Active.LookupFields.Add(new LookupField("True", "True"));
				        receiveemail_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablereceiveemail.Fields.Add("Active", receiveemail_Active);
                builder.Tables.Add("receiveemail", tablereceiveemail);
                builder.SubSonicTables.Add("receiveemail", tablereceiveemail);
                Table tablesponsor = new Table();
                tablesponsor.ShortName = "sponsor";
                tablesponsor.TableName = "sponsor";
                            tablesponsor.NumberOfChars = 80;
                tablesponsor.DataSourceTable = "sponsor";
                tablesponsor.OwnerID = "";
                    Field sponsor_ID = new Field();
                    sponsor_ID.Name = "ID";
        	        
        	        
        	        

                                            sponsor_ID.IsSearchable = true;

                                            sponsor_ID.ShowOnListPage = true;

                    sponsor_ID.LinkNewWindow = 0;
                    sponsor_ID.LinkDisplay = 0;
                    sponsor_ID.LinkParam = "";

        	        sponsor_ID.FieldType = 200;
        	        sponsor_ID.EditFormat = "Text field";
        	        sponsor_ID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        sponsor_ID.NeedEncode = true;

                    sponsor_ID.ControlType = 0;

        	        sponsor_ID.GoodName = "ID";
        	                	        sponsor_ID.FullName = "ID";
        	        
        	                	        
        	        
        	        sponsor_ID.Index = 1;
        	        
        	                	                	        sponsor_ID.EditParams = "";
        	                	        sponsor_ID.EditParams = sponsor_ID.EditParams + " maxlength=40";
        	                	                		                	        sponsor_ID.FieldPermissions = true;

        	        
                                        sponsor_ID.Container = tablesponsor;
        	        tablesponsor.Fields.Add("ID", sponsor_ID);
                    Field sponsor_FullName = new Field();
                    sponsor_FullName.Name = "FullName";
        	        sponsor_FullName.Label = "Full Name";
        	        
        	        

                                            sponsor_FullName.IsSearchable = true;

                                            sponsor_FullName.ShowOnListPage = true;

                    sponsor_FullName.LinkNewWindow = 0;
                    sponsor_FullName.LinkDisplay = 0;
                    sponsor_FullName.LinkParam = "";

        	        sponsor_FullName.FieldType = 200;
        	        sponsor_FullName.EditFormat = "Text field";
        	        sponsor_FullName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        sponsor_FullName.NeedEncode = true;

                    sponsor_FullName.ControlType = 0;

        	        sponsor_FullName.GoodName = "FullName";
        	                	        sponsor_FullName.FullName = "FullName";
        	        
        	                	        
        	        
        	        sponsor_FullName.Index = 2;
        	        
        	                	                	        sponsor_FullName.EditParams = "";
        	                	        sponsor_FullName.EditParams = sponsor_FullName.EditParams + " maxlength=125";
        	                	                		                	        sponsor_FullName.FieldPermissions = true;

        	        
                                        sponsor_FullName.Container = tablesponsor;
        	        tablesponsor.Fields.Add("FullName", sponsor_FullName);
                    Field sponsor_Email = new Field();
                    sponsor_Email.Name = "Email";
        	        
        	        
        	        

                                            sponsor_Email.IsSearchable = true;

                                            sponsor_Email.ShowOnListPage = true;

                    sponsor_Email.LinkNewWindow = 0;
                    sponsor_Email.LinkDisplay = 0;
                    sponsor_Email.LinkParam = "";

        	        sponsor_Email.FieldType = 200;
        	        sponsor_Email.EditFormat = "Text field";
        	        sponsor_Email.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        sponsor_Email.NeedEncode = true;

                    sponsor_Email.ControlType = 0;

        	        sponsor_Email.GoodName = "Email";
        	                	        sponsor_Email.FullName = "Email";
        	        
        	                	        
        	        
        	        sponsor_Email.Index = 3;
        	        
        	                	                	        sponsor_Email.EditParams = "";
        	                	        sponsor_Email.EditParams = sponsor_Email.EditParams + " maxlength=125";
        	                	                		                	        sponsor_Email.FieldPermissions = true;

        	        
                                        sponsor_Email.Container = tablesponsor;
        	        tablesponsor.Fields.Add("Email", sponsor_Email);
                    Field sponsor_Address = new Field();
                    sponsor_Address.Name = "Address";
        	        
        	        
        	        

                                            sponsor_Address.IsSearchable = true;

                                            sponsor_Address.ShowOnListPage = true;

                    sponsor_Address.LinkNewWindow = 0;
                    sponsor_Address.LinkDisplay = 0;
                    sponsor_Address.LinkParam = "";

        	        sponsor_Address.FieldType = 200;
        	        sponsor_Address.EditFormat = "Text field";
        	        sponsor_Address.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        sponsor_Address.NeedEncode = true;

                    sponsor_Address.ControlType = 0;

        	        sponsor_Address.GoodName = "Address";
        	                	        sponsor_Address.FullName = "Address";
        	        
        	                	        
        	        
        	        sponsor_Address.Index = 4;
        	        
        	                	                	        sponsor_Address.EditParams = "";
        	                	        sponsor_Address.EditParams = sponsor_Address.EditParams + " maxlength=500";
        	                	                		                	        sponsor_Address.FieldPermissions = true;

        	        
                                        sponsor_Address.Container = tablesponsor;
        	        tablesponsor.Fields.Add("Address", sponsor_Address);
                    Field sponsor_Phone = new Field();
                    sponsor_Phone.Name = "Phone";
        	        
        	        
        	        

                                            sponsor_Phone.IsSearchable = true;

                                            sponsor_Phone.ShowOnListPage = true;

                    sponsor_Phone.LinkNewWindow = 0;
                    sponsor_Phone.LinkDisplay = 0;
                    sponsor_Phone.LinkParam = "";

        	        sponsor_Phone.FieldType = 200;
        	        sponsor_Phone.EditFormat = "Text field";
        	        sponsor_Phone.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        sponsor_Phone.NeedEncode = true;

                    sponsor_Phone.ControlType = 0;

        	        sponsor_Phone.GoodName = "Phone";
        	                	        sponsor_Phone.FullName = "Phone";
        	        
        	                	        
        	        
        	        sponsor_Phone.Index = 5;
        	        
        	                	                	        sponsor_Phone.EditParams = "";
        	                	        sponsor_Phone.EditParams = sponsor_Phone.EditParams + " maxlength=20";
        	                	                		                	        sponsor_Phone.FieldPermissions = true;

        	        
                                        sponsor_Phone.Container = tablesponsor;
        	        tablesponsor.Fields.Add("Phone", sponsor_Phone);
                    Field sponsor_Description = new Field();
                    sponsor_Description.Name = "Description";
        	        
        	        
        	        

                                            sponsor_Description.IsSearchable = true;

                                            sponsor_Description.ShowOnListPage = true;

                    sponsor_Description.LinkNewWindow = 0;
                    sponsor_Description.LinkDisplay = 0;
                    sponsor_Description.LinkParam = "";

        	        sponsor_Description.FieldType = 200;
        	        sponsor_Description.EditFormat = "Text field";
        	        sponsor_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        sponsor_Description.NeedEncode = true;

                    sponsor_Description.ControlType = 0;

        	        sponsor_Description.GoodName = "Description";
        	                	        sponsor_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        sponsor_Description.Index = 6;
        	        
        	                	                	        sponsor_Description.EditParams = "";
        	                	        sponsor_Description.EditParams = sponsor_Description.EditParams + " maxlength=500";
        	                	                		                	        sponsor_Description.FieldPermissions = true;

        	        
                                        sponsor_Description.Container = tablesponsor;
        	        tablesponsor.Fields.Add("Description", sponsor_Description);
                    Field sponsor_Viplevel = new Field();
                    sponsor_Viplevel.Name = "Viplevel";
        	        
        	        
        	        

                                            sponsor_Viplevel.IsSearchable = true;

                                            sponsor_Viplevel.ShowOnListPage = true;

                    sponsor_Viplevel.LinkNewWindow = 0;
                    sponsor_Viplevel.LinkDisplay = 0;
                    sponsor_Viplevel.LinkParam = "";

        	        sponsor_Viplevel.FieldType = 3;
        	        sponsor_Viplevel.EditFormat = "Lookup wizard";
        	        sponsor_Viplevel.ViewFormat = "";
        	        
        	        
        	        
        	                	        sponsor_Viplevel.LookupType = 0;
        	                	                	                	                	        sponsor_Viplevel.NeedEncode = true;

                    sponsor_Viplevel.ControlType = 0;

        	        sponsor_Viplevel.GoodName = "Viplevel";
        	                	        sponsor_Viplevel.FullName = "Viplevel";
        	        
        	                	        
        	        
        	        sponsor_Viplevel.Index = 7;
        	        
        	                	                	                		                	        sponsor_Viplevel.FieldPermissions = true;

        	        
                                            sponsor_Viplevel.AddNewItem =  false ;
                                                sponsor_Viplevel.LinkField = "";
                        sponsor_Viplevel.DisplayField = "";
                        sponsor_Viplevel.LookupTable = "";
                        sponsor_Viplevel.StrSize = 1;
                                                    int dsponsor_Viplevel = 0;
		                    sponsor_Viplevel.Arr.Add(dsponsor_Viplevel,"0");
		                    dsponsor_Viplevel = dsponsor_Viplevel + 1;
		                    sponsor_Viplevel.Arr.Add(dsponsor_Viplevel,"1");
		                    dsponsor_Viplevel = dsponsor_Viplevel + 1;
		                    sponsor_Viplevel.Arr.Add(dsponsor_Viplevel,"2");
		                    dsponsor_Viplevel = dsponsor_Viplevel + 1;
		                    sponsor_Viplevel.Arr.Add(dsponsor_Viplevel,"3");
		                    dsponsor_Viplevel = dsponsor_Viplevel + 1;
		                    sponsor_Viplevel.Arr.Add(dsponsor_Viplevel,"4");
		                    dsponsor_Viplevel = dsponsor_Viplevel + 1;
		                    sponsor_Viplevel.Arr.Add(dsponsor_Viplevel,"5");
		                    dsponsor_Viplevel = dsponsor_Viplevel + 1;
                    sponsor_Viplevel.Container = tablesponsor;
				        sponsor_Viplevel.LookupFields.Add(new LookupField("0", "0"));
				        sponsor_Viplevel.LookupFields.Add(new LookupField("1", "1"));
				        sponsor_Viplevel.LookupFields.Add(new LookupField("2", "2"));
				        sponsor_Viplevel.LookupFields.Add(new LookupField("3", "3"));
				        sponsor_Viplevel.LookupFields.Add(new LookupField("4", "4"));
				        sponsor_Viplevel.LookupFields.Add(new LookupField("5", "5"));
        	        tablesponsor.Fields.Add("Viplevel", sponsor_Viplevel);
                    Field sponsor_Money = new Field();
                    sponsor_Money.Name = "Money";
        	        
        	        
        	        

                                            sponsor_Money.IsSearchable = true;

                                            sponsor_Money.ShowOnListPage = true;

                    sponsor_Money.LinkNewWindow = 0;
                    sponsor_Money.LinkDisplay = 0;
                    sponsor_Money.LinkParam = "";

        	        sponsor_Money.FieldType = 5;
        	        sponsor_Money.EditFormat = "Text field";
        	        sponsor_Money.ViewFormat = "Number";
        	        
        	        
        	        
        	                	                	                	        sponsor_Money.NeedEncode = true;

                    sponsor_Money.ControlType = 0;

        	        sponsor_Money.GoodName = "Money";
        	                	        sponsor_Money.FullName = "Money";
        	        
        	                	        
        	        
        	        sponsor_Money.Index = 8;
        	        
        	                	                	        sponsor_Money.EditParams = "";
        	                	                	                		                	        sponsor_Money.FieldPermissions = true;

        	        
                                        sponsor_Money.Container = tablesponsor;
        	        tablesponsor.Fields.Add("Money", sponsor_Money);
                    Field sponsor_Active = new Field();
                    sponsor_Active.Name = "Active";
        	        
        	        
        	        

                                            sponsor_Active.IsSearchable = true;

                                            sponsor_Active.ShowOnListPage = true;

                    sponsor_Active.LinkNewWindow = 0;
                    sponsor_Active.LinkDisplay = 0;
                    sponsor_Active.LinkParam = "";

        	        sponsor_Active.FieldType = 13;
        	        sponsor_Active.EditFormat = "Lookup wizard";
        	        sponsor_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        sponsor_Active.LookupType = 0;
        	                	                	                	        
                    sponsor_Active.ControlType = 0;

        	        sponsor_Active.GoodName = "Active";
        	                	        sponsor_Active.FullName = "Active";
        	        
        	                	        
        	        
        	        sponsor_Active.Index = 9;
        	        
        	                	                	                		                	        sponsor_Active.FieldPermissions = true;

        	        
                                            sponsor_Active.AddNewItem =  false ;
                                                sponsor_Active.LinkField = "";
                        sponsor_Active.DisplayField = "";
                        sponsor_Active.LookupTable = "";
                        sponsor_Active.StrSize = 1;
                                                    int dsponsor_Active = 0;
		                    sponsor_Active.Arr.Add(dsponsor_Active,"True");
		                    dsponsor_Active = dsponsor_Active + 1;
		                    sponsor_Active.Arr.Add(dsponsor_Active,"False");
		                    dsponsor_Active = dsponsor_Active + 1;
                    sponsor_Active.Container = tablesponsor;
				        sponsor_Active.LookupFields.Add(new LookupField("True", "True"));
				        sponsor_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tablesponsor.Fields.Add("Active", sponsor_Active);
                    Field sponsor_CreatedDate = new Field();
                    sponsor_CreatedDate.Name = "CreatedDate";
        	        sponsor_CreatedDate.Label = "Created Date";
        	        
        	        

                                            sponsor_CreatedDate.IsSearchable = true;

                                            sponsor_CreatedDate.ShowOnListPage = true;

                    sponsor_CreatedDate.LinkNewWindow = 0;
                    sponsor_CreatedDate.LinkDisplay = 0;
                    sponsor_CreatedDate.LinkParam = "";

        	        sponsor_CreatedDate.FieldType = 7;
        	        sponsor_CreatedDate.EditFormat = "Date";
        	        sponsor_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        sponsor_CreatedDate.NeedEncode = true;

                    sponsor_CreatedDate.ControlType = 0;

        	        sponsor_CreatedDate.GoodName = "CreatedDate";
        	                	        sponsor_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        sponsor_CreatedDate.Index = 10;
        	         sponsor_CreatedDate.DateEditType = 13;
        	                	                	                		                	        sponsor_CreatedDate.FieldPermissions = true;

        	        
                                        sponsor_CreatedDate.Container = tablesponsor;
        	        tablesponsor.Fields.Add("CreatedDate", sponsor_CreatedDate);
                builder.Tables.Add("sponsor", tablesponsor);
                builder.SubSonicTables.Add("sponsor", tablesponsor);
                Table tableuser = new Table();
                tableuser.ShortName = "user";
                tableuser.TableName = "user";
                            tableuser.NumberOfChars = 80;
                tableuser.DataSourceTable = "user";
                tableuser.OwnerID = "";
                    Field user_UserID = new Field();
                    user_UserID.Name = "UserID";
        	        user_UserID.Label = "User ID";
        	        
        	        

                                            user_UserID.IsSearchable = true;

                                            user_UserID.ShowOnListPage = true;

                    user_UserID.LinkNewWindow = 0;
                    user_UserID.LinkDisplay = 0;
                    user_UserID.LinkParam = "";

        	        user_UserID.FieldType = 200;
        	        user_UserID.EditFormat = "Text field";
        	        user_UserID.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_UserID.NeedEncode = true;

                    user_UserID.ControlType = 0;

        	        user_UserID.GoodName = "UserID";
        	                	        user_UserID.FullName = "UserID";
        	        
        	                	        
        	        
        	        user_UserID.Index = 1;
        	        
        	                	                	        user_UserID.EditParams = "";
        	                	        user_UserID.EditParams = user_UserID.EditParams + " maxlength=40";
        	                	                		                	        user_UserID.FieldPermissions = true;

        	        
                                        user_UserID.Container = tableuser;
        	        tableuser.Fields.Add("UserID", user_UserID);
                    Field user_UserName = new Field();
                    user_UserName.Name = "UserName";
        	        user_UserName.Label = "User Name";
        	        
        	        

                                            user_UserName.IsSearchable = true;

                                            user_UserName.ShowOnListPage = true;

                    user_UserName.LinkNewWindow = 0;
                    user_UserName.LinkDisplay = 0;
                    user_UserName.LinkParam = "";

        	        user_UserName.FieldType = 200;
        	        user_UserName.EditFormat = "Text field";
        	        user_UserName.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_UserName.NeedEncode = true;

                    user_UserName.ControlType = 0;

        	        user_UserName.GoodName = "UserName";
        	                	        user_UserName.FullName = "UserName";
        	        
        	                	        
        	        
        	        user_UserName.Index = 2;
        	        
        	                	                	        user_UserName.EditParams = "";
        	                	        user_UserName.EditParams = user_UserName.EditParams + " maxlength=50";
        	                	                		                	        user_UserName.FieldPermissions = true;

        	        
                                        user_UserName.Container = tableuser;
        	        tableuser.Fields.Add("UserName", user_UserName);
                    Field user_Password = new Field();
                    user_Password.Name = "Password";
        	        
        	        
        	        

                                            user_Password.IsSearchable = true;

                                            user_Password.ShowOnListPage = true;

                    user_Password.LinkNewWindow = 0;
                    user_Password.LinkDisplay = 0;
                    user_Password.LinkParam = "";

        	        user_Password.FieldType = 200;
        	        user_Password.EditFormat = "Text field";
        	        user_Password.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_Password.NeedEncode = true;

                    user_Password.ControlType = 0;

        	        user_Password.GoodName = "Password";
        	                	        user_Password.FullName = "Password";
        	        
        	                	        
        	        
        	        user_Password.Index = 3;
        	        
        	                	                	        user_Password.EditParams = "";
        	                	        user_Password.EditParams = user_Password.EditParams + " maxlength=50";
        	                	                		                	        user_Password.FieldPermissions = true;

        	        
                                        user_Password.Container = tableuser;
        	        tableuser.Fields.Add("Password", user_Password);
                    Field user_Email = new Field();
                    user_Email.Name = "Email";
        	        
        	        
        	        

                                            user_Email.IsSearchable = true;

                                            user_Email.ShowOnListPage = true;

                    user_Email.LinkNewWindow = 0;
                    user_Email.LinkDisplay = 0;
                    user_Email.LinkParam = "";

        	        user_Email.FieldType = 200;
        	        user_Email.EditFormat = "Text field";
        	        user_Email.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_Email.NeedEncode = true;

                    user_Email.ControlType = 0;

        	        user_Email.GoodName = "Email";
        	                	        user_Email.FullName = "Email";
        	        
        	                	        
        	        
        	        user_Email.Index = 4;
        	        
        	                	                	        user_Email.EditParams = "";
        	                	        user_Email.EditParams = user_Email.EditParams + " maxlength=125";
        	                	                		                	        user_Email.FieldPermissions = true;

        	        
                                        user_Email.Container = tableuser;
        	        tableuser.Fields.Add("Email", user_Email);
                    Field user_Address = new Field();
                    user_Address.Name = "Address";
        	        
        	        
        	        

                                            user_Address.IsSearchable = true;

                                            user_Address.ShowOnListPage = true;

                    user_Address.LinkNewWindow = 0;
                    user_Address.LinkDisplay = 0;
                    user_Address.LinkParam = "";

        	        user_Address.FieldType = 200;
        	        user_Address.EditFormat = "Text field";
        	        user_Address.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_Address.NeedEncode = true;

                    user_Address.ControlType = 0;

        	        user_Address.GoodName = "Address";
        	                	        user_Address.FullName = "Address";
        	        
        	                	        
        	        
        	        user_Address.Index = 5;
        	        
        	                	                	        user_Address.EditParams = "";
        	                	        user_Address.EditParams = user_Address.EditParams + " maxlength=255";
        	                	                		                	        user_Address.FieldPermissions = true;

        	        
                                        user_Address.Container = tableuser;
        	        tableuser.Fields.Add("Address", user_Address);
                    Field user_Phone = new Field();
                    user_Phone.Name = "Phone";
        	        
        	        
        	        

                                            user_Phone.IsSearchable = true;

                                            user_Phone.ShowOnListPage = true;

                    user_Phone.LinkNewWindow = 0;
                    user_Phone.LinkDisplay = 0;
                    user_Phone.LinkParam = "";

        	        user_Phone.FieldType = 200;
        	        user_Phone.EditFormat = "Text field";
        	        user_Phone.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_Phone.NeedEncode = true;

                    user_Phone.ControlType = 0;

        	        user_Phone.GoodName = "Phone";
        	                	        user_Phone.FullName = "Phone";
        	        
        	                	        
        	        
        	        user_Phone.Index = 6;
        	        
        	                	                	        user_Phone.EditParams = "";
        	                	        user_Phone.EditParams = user_Phone.EditParams + " maxlength=20";
        	                	                		                	        user_Phone.FieldPermissions = true;

        	        
                                        user_Phone.Container = tableuser;
        	        tableuser.Fields.Add("Phone", user_Phone);
                    Field user_DOB = new Field();
                    user_DOB.Name = "DOB";
        	        
        	        
        	        

                                            user_DOB.IsSearchable = true;

                                            user_DOB.ShowOnListPage = true;

                    user_DOB.LinkNewWindow = 0;
                    user_DOB.LinkDisplay = 0;
                    user_DOB.LinkParam = "";

        	        user_DOB.FieldType = 200;
        	        user_DOB.EditFormat = "Date";
        	        user_DOB.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_DOB.NeedEncode = true;

                    user_DOB.ControlType = 0;

        	        user_DOB.GoodName = "DOB";
        	                	        user_DOB.FullName = "DOB";
        	        
        	                	        
        	        
        	        user_DOB.Index = 7;
        	         user_DOB.DateEditType = 13;
        	                	                	                		                	        user_DOB.FieldPermissions = true;

        	        
                                        user_DOB.Container = tableuser;
        	        tableuser.Fields.Add("DOB", user_DOB);
                    Field user_Description = new Field();
                    user_Description.Name = "Description";
        	        
        	        
        	        

                                            user_Description.IsSearchable = true;

                                            user_Description.ShowOnListPage = true;

                    user_Description.LinkNewWindow = 0;
                    user_Description.LinkDisplay = 0;
                    user_Description.LinkParam = "";

        	        user_Description.FieldType = 200;
        	        user_Description.EditFormat = "Text field";
        	        user_Description.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_Description.NeedEncode = true;

                    user_Description.ControlType = 0;

        	        user_Description.GoodName = "Description";
        	                	        user_Description.FullName = "Description";
        	        
        	                	        
        	        
        	        user_Description.Index = 8;
        	        
        	                	                	        user_Description.EditParams = "";
        	                	        user_Description.EditParams = user_Description.EditParams + " maxlength=500";
        	                	                		                	        user_Description.FieldPermissions = true;

        	        
                                        user_Description.Container = tableuser;
        	        tableuser.Fields.Add("Description", user_Description);
                    Field user_Active = new Field();
                    user_Active.Name = "Active";
        	        
        	        
        	        

                                            user_Active.IsSearchable = true;

                                            user_Active.ShowOnListPage = true;

                    user_Active.LinkNewWindow = 0;
                    user_Active.LinkDisplay = 0;
                    user_Active.LinkParam = "";

        	        user_Active.FieldType = 13;
        	        user_Active.EditFormat = "Lookup wizard";
        	        user_Active.ViewFormat = "Checkbox";
        	        
        	        
        	        
        	                	        user_Active.LookupType = 0;
        	                	                	                	        
                    user_Active.ControlType = 0;

        	        user_Active.GoodName = "Active";
        	                	        user_Active.FullName = "Active";
        	         user_Active.IsRequired = true;
        	                	        
        	        
        	        user_Active.Index = 9;
        	        
        	                	                	                		                	        user_Active.FieldPermissions = true;

        	        
                                            user_Active.AddNewItem =  false ;
                                                user_Active.LinkField = "";
                        user_Active.DisplayField = "";
                        user_Active.LookupTable = "";
                        user_Active.StrSize = 1;
                                                    int duser_Active = 0;
		                    user_Active.Arr.Add(duser_Active,"True");
		                    duser_Active = duser_Active + 1;
		                    user_Active.Arr.Add(duser_Active,"False");
		                    duser_Active = duser_Active + 1;
                    user_Active.Container = tableuser;
				        user_Active.LookupFields.Add(new LookupField("True", "True"));
				        user_Active.LookupFields.Add(new LookupField("False", "False"));
        	        tableuser.Fields.Add("Active", user_Active);
                    Field user_UserType = new Field();
                    user_UserType.Name = "UserType";
        	        user_UserType.Label = "User Type";
        	        
        	        

                                            user_UserType.IsSearchable = true;

                                            user_UserType.ShowOnListPage = true;

                    user_UserType.LinkNewWindow = 0;
                    user_UserType.LinkDisplay = 0;
                    user_UserType.LinkParam = "";

        	        user_UserType.FieldType = 3;
        	        user_UserType.EditFormat = "Text field";
        	        user_UserType.ViewFormat = "";
        	        
        	        
        	        
        	                	                	                	        user_UserType.NeedEncode = true;

                    user_UserType.ControlType = 0;

        	        user_UserType.GoodName = "UserType";
        	                	        user_UserType.FullName = "UserType";
        	        
        	                	        
        	        
        	        user_UserType.Index = 10;
        	        
        	                	                	        user_UserType.EditParams = "";
        	                	                	                		                	        user_UserType.FieldPermissions = true;

        	        
                                        user_UserType.Container = tableuser;
        	        tableuser.Fields.Add("UserType", user_UserType);
                    Field user_CreatedDate = new Field();
                    user_CreatedDate.Name = "CreatedDate";
        	        user_CreatedDate.Label = "Created Date";
        	        
        	        

                                            user_CreatedDate.IsSearchable = true;

                                            user_CreatedDate.ShowOnListPage = true;

                    user_CreatedDate.LinkNewWindow = 0;
                    user_CreatedDate.LinkDisplay = 0;
                    user_CreatedDate.LinkParam = "";

        	        user_CreatedDate.FieldType = 135;
        	        user_CreatedDate.EditFormat = "Date";
        	        user_CreatedDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        user_CreatedDate.NeedEncode = true;

                    user_CreatedDate.ControlType = 0;

        	        user_CreatedDate.GoodName = "CreatedDate";
        	                	        user_CreatedDate.FullName = "CreatedDate";
        	        
        	                	        
        	        
        	        user_CreatedDate.Index = 11;
        	         user_CreatedDate.DateEditType = 13;
        	                	                	                		                	        user_CreatedDate.FieldPermissions = true;

        	        
                                        user_CreatedDate.Container = tableuser;
        	        tableuser.Fields.Add("CreatedDate", user_CreatedDate);
                    Field user_UpdateDate = new Field();
                    user_UpdateDate.Name = "UpdateDate";
        	        user_UpdateDate.Label = "Update Date";
        	        
        	        

                                            user_UpdateDate.IsSearchable = true;

                                            user_UpdateDate.ShowOnListPage = true;

                    user_UpdateDate.LinkNewWindow = 0;
                    user_UpdateDate.LinkDisplay = 0;
                    user_UpdateDate.LinkParam = "";

        	        user_UpdateDate.FieldType = 135;
        	        user_UpdateDate.EditFormat = "Date";
        	        user_UpdateDate.ViewFormat = "Short Date";
        	        
        	        
        	        
        	                	                	                	        user_UpdateDate.NeedEncode = true;

                    user_UpdateDate.ControlType = 0;

        	        user_UpdateDate.GoodName = "UpdateDate";
        	                	        user_UpdateDate.FullName = "UpdateDate";
        	        
        	                	        
        	        
        	        user_UpdateDate.Index = 12;
        	         user_UpdateDate.DateEditType = 13;
        	                	                	                		                	        user_UpdateDate.FieldPermissions = true;

        	        
                                        user_UpdateDate.Container = tableuser;
        	        tableuser.Fields.Add("UpdateDate", user_UpdateDate);
                builder.Tables.Add("user", tableuser);
                builder.SubSonicTables.Add("user", tableuser);
            builder.LONG_BINARY =     "LONG BINARY DATA - CANNOT BE DISPLAYED";
            builder.NO =              "No";
            builder.YES =             "Yes";
            builder.CLOSE_WINDOW =    "Close window";
            builder.MORE =            "More";
            builder.PICKUP_DATE =     "Click Here to Pick up the date";
            builder.ADD_NEW =         "Add new";
            builder.PLEASE_SELECT =   "Please select";
            builder.FILENAME =        "Filename";
            builder.KEEP =            "Keep";
            builder.DELETE =          "Delete";
            builder.UPDATE =          "Update";
            builder.ERR_HAPPENED =    "error happened";
            builder.TECH_INFO =       "Technical information";
            builder.ERR_DESC =        "Error description";
            builder.URL =             "URL";
            builder.SQL_QUERY =       "SQL query";
            builder.RteType     =     "BASIC";
            return builder;
        }
    }
}
